forked from Imagelibrary/binutils-gdb
riscv: Use run-time endianess for floating point literals
gas/ PR binutils/30551 * config/tc-riscv.c (md_atof): Use target_big_endian instead of TARGET_BYTES_BIG_ENDIAN. * testsuite/gas/riscv/float-be.d: New file. * testsuite/gas/riscv/float-le.d: New file. * testsuite/gas/riscv/float.s: New file.
This commit is contained in:
@@ -3693,7 +3693,7 @@ md_assemble (char *str)
|
||||
const char *
|
||||
md_atof (int type, char *litP, int *sizeP)
|
||||
{
|
||||
return ieee_md_atof (type, litP, sizeP, TARGET_BYTES_BIG_ENDIAN);
|
||||
return ieee_md_atof (type, litP, sizeP, target_big_endian);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
8
gas/testsuite/gas/riscv/float-be.d
Normal file
8
gas/testsuite/gas/riscv/float-be.d
Normal file
@@ -0,0 +1,8 @@
|
||||
# source: float.s
|
||||
# objdump: -sj .data
|
||||
# as: -mbig-endian
|
||||
|
||||
.*:[ ]+file format .*bigriscv
|
||||
|
||||
Contents of section \.data:
|
||||
0000 3f8ccccd 40019999 9999999a.*
|
||||
8
gas/testsuite/gas/riscv/float-le.d
Normal file
8
gas/testsuite/gas/riscv/float-le.d
Normal file
@@ -0,0 +1,8 @@
|
||||
# source: float.s
|
||||
# objdump: -sj .data
|
||||
# as: -mlittle-endian
|
||||
|
||||
.*:[ ]+file format .*littleriscv
|
||||
|
||||
Contents of section \.data:
|
||||
0000 cdcc8c3f 9a999999 99990140.*
|
||||
3
gas/testsuite/gas/riscv/float.s
Normal file
3
gas/testsuite/gas/riscv/float.s
Normal file
@@ -0,0 +1,3 @@
|
||||
.data
|
||||
.float 1.1
|
||||
.double 2.2
|
||||
Reference in New Issue
Block a user