aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-i386.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2021-08-11 08:30:26 +0200
committerJan Beulich <jbeulich@suse.com>2021-08-11 08:30:26 +0200
commite2295dade838ad296e1e1cd1096177058139b6b3 (patch)
treee3a3e336bd33766ed7aea049b5b5f8ab887985e0 /gas/config/tc-i386.c
parente7e57d02fb51dcb1e976f1a089de3113d9aac2ba (diff)
downloadgdb-e2295dade838ad296e1e1cd1096177058139b6b3.zip
gdb-e2295dade838ad296e1e1cd1096177058139b6b3.tar.gz
gdb-e2295dade838ad296e1e1cd1096177058139b6b3.tar.bz2
x86/ELF: fix .tfloat output
The ELF psABI-s are quite clear here: On 32-bit the data type is 12 bytes long (with 2 bytes of trailing padding), while on 64-bit it is 16 bytes long (with 6 bytes of padding). Make ieee_md_atof() capable of handling such padding, and specify the needed padding for x86 (leaving non-ELF targets alone for now). Split the existing x86 testcase.
Diffstat (limited to 'gas/config/tc-i386.c')
-rw-r--r--gas/config/tc-i386.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index cdc660f..0fa8b0d 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -10229,6 +10229,19 @@ x86_cons_fix_new (fragS *frag, unsigned int off, unsigned int len,
fix_new_exp (frag, off, len, exp, 0, r);
}
+/* Return the number of padding LITTLENUMs following a tbyte floating
+ point value. */
+
+int
+x86_tfloat_pad (void)
+{
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+ if (IS_ELF)
+ return object_64bit ? 3 : 1;
+#endif
+ return 0;
+}
+
/* Export the ABI address size for use by TC_ADDRESS_BYTES for the
purpose of the `.dc.a' internal pseudo-op. */