* [PATCH] VAX: VAX MACRO compatible ./type/_floating, testcase for flonums
@ 2005-03-30 19:23 Jan-Benedict Glaw
2005-04-01 14:17 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: Jan-Benedict Glaw @ 2005-03-30 19:23 UTC (permalink / raw)
To: binutils
Hi!
I thought it would be somewhat useful to allow
.h_floating 1234.46
as well as .hfloat , to be compatibel to what the VAX MACRO
assembler offers. This patch also adds a testcase for flonums.
I've written a standalone C program to verify the resulting binary
representation. Cross-checked (hosted on PC) for vax-{linux,ultrix,
netbsd,netbsdelf}.
2005-03-30 Jan-Benedict Glaw <jbglaw@lug-owl.de>
gas/
* NEWS: Mention [fdgh]_floating.
gas/config/
* atof-vax.c: Fix some whitespace.
* tc-vax.c: (md_pseudo_table) Add "[fdgh]_floating".
gas/testsuite/gas/vax/
* flonum.s: New testcase: encode some flonums.
* flonum.d: Expected result of new testcase.
* vax.exp: Call new testcase.
diff -Nurp src-fresh/gas/config/atof-vax.c src-hacked/gas/config/atof-vax.c
--- src-fresh/gas/config/atof-vax.c 2005-03-23 12:42:27.000000000 +0100
+++ src-hacked/gas/config/atof-vax.c 2005-03-29 23:26:40.000000000 +0200
@@ -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 -Nurp src-fresh/gas/config/tc-vax.c src-hacked/gas/config/tc-vax.c
--- src-fresh/gas/config/tc-vax.c 2005-02-23 13:28:06.000000000 +0100
+++ src-hacked/gas/config/tc-vax.c 2005-03-29 23:32:19.000000000 +0200
@@ -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 -Nurp src-fresh/gas/NEWS src-hacked/gas/NEWS
--- src-fresh/gas/NEWS 2005-03-29 22:11:39.000000000 +0200
+++ src-hacked/gas/NEWS 2005-03-30 12:32:17.000000000 +0200
@@ -1,5 +1,8 @@
-*- text -*-
+* Allow .f_floating, .d_floating, .g_floating and .h_floating for
+ VAX targets to be more compatible to VAX MACRO.
+
* New command line option -mtune=[itanium1|itanium2] for IA64 targets.
Changes in 2.16:
diff -Nurp src-fresh/gas/testsuite/gas/vax/flonum.d src-hacked/gas/testsuite/gas/vax/flonum.d
--- src-fresh/gas/testsuite/gas/vax/flonum.d 1970-01-01 01:00:00.000000000 +0100
+++ src-hacked/gas/testsuite/gas/vax/flonum.d 2005-03-30 11:48:15.000000000 +0200
@@ -0,0 +1,13 @@
+#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 -Nurp src-fresh/gas/testsuite/gas/vax/flonum.s src-hacked/gas/testsuite/gas/vax/flonum.s
--- src-fresh/gas/testsuite/gas/vax/flonum.s 1970-01-01 01:00:00.000000000 +0100
+++ src-hacked/gas/testsuite/gas/vax/flonum.s 2005-03-30 11:42:39.000000000 +0200
@@ -0,0 +1,13 @@
+.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 -Nurp src-fresh/gas/testsuite/gas/vax/vax.exp src-hacked/gas/testsuite/gas/vax/vax.exp
--- src-fresh/gas/testsuite/gas/vax/vax.exp 2003-12-03 16:07:17.000000000 +0100
+++ src-hacked/gas/testsuite/gas/vax/vax.exp 2005-03-29 23:43:18.000000000 +0200
@@ -29,6 +29,8 @@ proc do_quad {} {
if [istarget vax-*-* ] then {
do_quad
+ run_dump_test "flonum"
+
if [istarget vax-*-*elf*] {
run_dump_test "elf-rel"
}
MfG, JBG
--
AWEK microdata GmbH -- Am Wellbach 4 -- 33609 Bielefeld
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] VAX: VAX MACRO compatible ./type/_floating, testcase for flonums
2005-03-30 19:23 [PATCH] VAX: VAX MACRO compatible ./type/_floating, testcase for flonums Jan-Benedict Glaw
@ 2005-04-01 14:17 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2005-04-01 14:17 UTC (permalink / raw)
To: Jan-Benedict Glaw; +Cc: binutils
Hi Jan-Benedict,
> 2005-03-30 Jan-Benedict Glaw <jbglaw@lug-owl.de>
>
> gas/
> * NEWS: Mention [fdgh]_floating.
>
> gas/config/
> * atof-vax.c: Fix some whitespace.
> * tc-vax.c: (md_pseudo_table) Add "[fdgh]_floating".
>
> gas/testsuite/gas/vax/
> * flonum.s: New testcase: encode some flonums.
> * flonum.d: Expected result of new testcase.
> * vax.exp: Call new testcase.
Approved and applied.
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-04-01 14:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-30 19:23 [PATCH] VAX: VAX MACRO compatible ./type/_floating, testcase for flonums Jan-Benedict Glaw
2005-04-01 14:17 ` Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).