From d2c5f73ed772457d6e3b82d38abe007863ddca2c Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 1 Apr 2005 14:17:17 +0000 Subject: [PATCH] Support the .f_floating, .d_floating, .g_floating and .h_floating directives for the VAX target in order to be more compatible with the VAX MACRO assembler. --- gas/ChangeLog | 6 ++++++ gas/NEWS | 4 ++++ gas/config/atof-vax.c | 2 +- gas/config/tc-vax.c | 4 ++++ gas/testsuite/ChangeLog | 11 +++++++---- gas/testsuite/gas/vax/flonum.d | 12 ++++++++++++ gas/testsuite/gas/vax/flonum.s | 12 ++++++++++++ gas/testsuite/gas/vax/vax.exp | 2 ++ 8 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 gas/testsuite/gas/vax/flonum.d create mode 100644 gas/testsuite/gas/vax/flonum.s diff --git a/gas/ChangeLog b/gas/ChangeLog index 46cdf48e9bb..7642fd76bff 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2005-04-01 Jan-Benedict Glaw + + * NEWS: Mention [fdgh]_floating. + * config/atof-vax.c: Fix some whitespace. + * config/tc-vax.c (md_pseudo_table): Add "[fdgh]_floating". + 2005-04-01 Nick Clifton * configure.in: Add a check for providing a prototype diff --git a/gas/NEWS b/gas/NEWS index a0aa0886452..0e9b332501a 100644 --- a/gas/NEWS +++ b/gas/NEWS @@ -1,5 +1,9 @@ -*- text -*- +* Support the .f_floating, .d_floating, .g_floating and .h_floating directives + for the VAX target in order to be more compatible with the VAX MACRO + assembler. + * New command line option -mtune=[itanium1|itanium2] for IA64 targets. Changes in 2.16: diff --git a/gas/config/atof-vax.c b/gas/config/atof-vax.c index b94e5609f91..7cc139b9fcb 100644 --- a/gas/config/atof-vax.c +++ b/gas/config/atof-vax.c @@ -29,7 +29,7 @@ #define F_PRECISION 2 /* Length in LittleNums of guard bits. */ -#define GUARD 2 +#define GUARD 2 int flonum_gen2vax (int, FLONUM_TYPE *, LITTLENUM_TYPE *); diff --git a/gas/config/tc-vax.c b/gas/config/tc-vax.c index 1b4e6f1793c..fef859e8066 100644 --- a/gas/config/tc-vax.c +++ b/gas/config/tc-vax.c @@ -251,6 +251,10 @@ const pseudo_typeS md_pseudo_table[] = {"ffloat", float_cons, 'f'}, {"gfloat", float_cons, 'g'}, {"hfloat", float_cons, 'h'}, + {"d_floating", float_cons, 'd'}, + {"f_floating", float_cons, 'f'}, + {"g_floating", float_cons, 'g'}, + {"h_floating", float_cons, 'h'}, {NULL, NULL, 0}, }; diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 44bf28f9d0a..be446003118 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,9 +1,12 @@ 2005-04-01 Jan-Benedict Glaw - * gas/testsuite/gas/vax/elf-rel.d: Call gas with -k. Thanks to - Matt Thomas for figuring out. - * gas/testsuite/gas/vax/vax.exp: Run elf-rel.[sd] for NetBSD-ELF - and Linux. + * gas/vax/flonum.s: New testcase: Encode some flonums. + * gas/vax/flonum.d: Expected result of new testcase. + * gas/vax/vax.exp: Call the new testcase. + + * gas/vax/elf-rel.d: Call gas with -k. Thanks to Matt Thomas for + figuring out. + * gas/vax/vax.exp: Run elf-rel.[sd] for NetBSD-ELF and Linux. 2005-04-01 Jan Beulich diff --git a/gas/testsuite/gas/vax/flonum.d b/gas/testsuite/gas/vax/flonum.d new file mode 100644 index 00000000000..38d20cda023 --- /dev/null +++ b/gas/testsuite/gas/vax/flonum.d @@ -0,0 +1,12 @@ +#objdump: -sw +#name: VAX flonum test + +.*: file format .* + +Contents of section .data: + 0000 fc3e5bd3 9e401006 1641751f 5d41e23b .* + 0010 5d2e5de1 9241272c 37a6ce36 b5418cb9 .* + 0020 287e0b24 3b40f227 c83c2bde 3f407b8f .* + 0030 069ee40f 0440d61c 4ce09205 3810675c .* + 0040 e3df062a 04406520 db16d80d d72f205e .* + 0050 c746ae64 .* diff --git a/gas/testsuite/gas/vax/flonum.s b/gas/testsuite/gas/vax/flonum.s new file mode 100644 index 00000000000..9793c38459a --- /dev/null +++ b/gas/testsuite/gas/vax/flonum.s @@ -0,0 +1,12 @@ +.data + +.float 0.12345 +.ffloat 1.23456 +.f_floating 2.34567 +.double 3.45678 +.dfloat 4.56789 +.d_floating 5.67890 +.gfloat 6.78901 +.g_floating 7.89012 +.hfloat 8.90123 +.h_floating 9.01234 diff --git a/gas/testsuite/gas/vax/vax.exp b/gas/testsuite/gas/vax/vax.exp index 7ba8c27548c..d1b998698aa 100644 --- a/gas/testsuite/gas/vax/vax.exp +++ b/gas/testsuite/gas/vax/vax.exp @@ -29,6 +29,8 @@ proc do_quad {} { if [istarget vax-*-* ] then { do_quad + run_dump_test "flonum" + if { [istarget vax-*-*elf*] || [istarget vax-*-linux-gnu*] } then { run_dump_test "elf-rel" } -- 2.30.2