aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorYufeng Zhang <yufeng.zhang@arm.com>2013-03-05 16:31:44 +0000
committerYufeng Zhang <yufeng.zhang@arm.com>2013-03-05 16:31:44 +0000
commit62b0d0d5f3b116a7e7014ef50d3103bbef7a89de (patch)
treea4018302ccb80efd6372d299eca89638e14029ee /gas/testsuite
parent334ad4a8e4eca1cdc483ff3d24348b34488769eb (diff)
downloadgdb-62b0d0d5f3b116a7e7014ef50d3103bbef7a89de.zip
gdb-62b0d0d5f3b116a7e7014ef50d3103bbef7a89de.tar.gz
gdb-62b0d0d5f3b116a7e7014ef50d3103bbef7a89de.tar.bz2
Add to the AArch64 GAS the missing support for hexadecimal-format
floating-point literal in the FMOV instruction. gas/ * config/tc-aarch64.c (aarch64_imm_float_p): Rename 'e' to 'pattern'; add comment. (aarch64_double_precision_fmovable): New function. (parse_aarch64_imm_float): Add parameter 'dp_p'; call the new function; handle hexadecimal representation of IEEE754 encoding. (parse_operands): Update the call to parse_aarch64_imm_float. gas/testsuite/ * gas/aarch64/diagnostic.s: Add test. * gas/aarch64/diagnostic.l: Update. * gas/aarch64/illegal.s: Add test. * gas/aarch64/illegal.l: Update. * gas/aarch64/fpmov.s: New file. * gas/aarch64/fpmov.d: New file.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog9
-rw-r--r--gas/testsuite/gas/aarch64/diagnostic.l1
-rw-r--r--gas/testsuite/gas/aarch64/diagnostic.s1
-rw-r--r--gas/testsuite/gas/aarch64/fpmov.d19
-rw-r--r--gas/testsuite/gas/aarch64/fpmov.s17
-rw-r--r--gas/testsuite/gas/aarch64/illegal.l5
-rw-r--r--gas/testsuite/gas/aarch64/illegal.s4
7 files changed, 55 insertions, 1 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index dd23d56..d89f44f 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2013-03-05 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * gas/aarch64/diagnostic.s: Add test.
+ * gas/aarch64/diagnostic.l: Update.
+ * gas/aarch64/illegal.s: Add test.
+ * gas/aarch64/illegal.l: Update.
+ * gas/aarch64/fpmov.s: New file.
+ * gas/aarch64/fpmov.d: New file.
+
2013-03-01 H.J. Lu <hongjiu.lu@intel.com>
* gas/i386/inval.s: Add tests for invalid addresses and eiz.
diff --git a/gas/testsuite/gas/aarch64/diagnostic.l b/gas/testsuite/gas/aarch64/diagnostic.l
index 5745012..0a08011 100644
--- a/gas/testsuite/gas/aarch64/diagnostic.l
+++ b/gas/testsuite/gas/aarch64/diagnostic.l
@@ -86,3 +86,4 @@
[^:]*:88: Error: shift is not permitted at operand 2 -- `movi v1.2d,4294967295,lsl#0'
[^:]*:89: Error: shift amount expected to be 0 at operand 2 -- `movi v1.8b,97,lsl#8'
[^:]*:90: Error: unknown or missing system register name at operand 1 -- `msr dummy,x1'
+[^:]*:91: Error: invalid floating-point constant at operand 2 -- `fmov s0,0x42000000'
diff --git a/gas/testsuite/gas/aarch64/diagnostic.s b/gas/testsuite/gas/aarch64/diagnostic.s
index 1fa1b74..99ebf8f 100644
--- a/gas/testsuite/gas/aarch64/diagnostic.s
+++ b/gas/testsuite/gas/aarch64/diagnostic.s
@@ -88,3 +88,4 @@
movi v1.2d, 4294967295, lsl #0
movi v1.8b, 97, lsl #8
msr dummy, x1
+ fmov s0, 0x42000000
diff --git a/gas/testsuite/gas/aarch64/fpmov.d b/gas/testsuite/gas/aarch64/fpmov.d
new file mode 100644
index 0000000..6afb3c5
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/fpmov.d
@@ -0,0 +1,19 @@
+#objdump: -dr
+
+.*: file format .*
+
+Disassembly of section .*:
+
+0000000000000000 <.*>:
+ 0: 1e251000 fmov s0, #1\.200000000000000000e\+01
+ 4: 1e251000 fmov s0, #1\.200000000000000000e\+01
+ 8: 1e251000 fmov s0, #1\.200000000000000000e\+01
+ c: 1e351000 fmov s0, #-1\.200000000000000000e\+01
+ 10: 1e351000 fmov s0, #-1\.200000000000000000e\+01
+ 14: 1e351000 fmov s0, #-1\.200000000000000000e\+01
+ 18: 1e751000 fmov d0, #-1\.200000000000000000e\+01
+ 1c: 1e751000 fmov d0, #-1\.200000000000000000e\+01
+ 20: 1e751000 fmov d0, #-1\.200000000000000000e\+01
+ 24: 1e69f000 fmov d0, #2\.421875000000000000e-01
+ 28: 1e69f000 fmov d0, #2\.421875000000000000e-01
+ 2c: 1e29f000 fmov s0, #2\.421875000000000000e-01
diff --git a/gas/testsuite/gas/aarch64/fpmov.s b/gas/testsuite/gas/aarch64/fpmov.s
new file mode 100644
index 0000000..ffc9881
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/fpmov.s
@@ -0,0 +1,17 @@
+// fpmov.s Test file for AArch64 floating-point move instructions.
+
+ .text
+
+ // fp mov immediate
+ fmov s0, 12.0
+ fmov s0, 1.2e1
+ fmov s0, 0x41400000
+ fmov s0, -12.0
+ fmov s0, -1.2e1
+ fmov s0, 0xc1400000
+ fmov d0, -12.0
+ fmov d0, -1.2e1
+ fmov d0, 0xC028000000000000
+ fmov d0, 0.2421875
+ fmov d0, 0x3fcf000000000000
+ fmov s0, 0x3e780000
diff --git a/gas/testsuite/gas/aarch64/illegal.l b/gas/testsuite/gas/aarch64/illegal.l
index 5bc9c3c..d7740b9 100644
--- a/gas/testsuite/gas/aarch64/illegal.l
+++ b/gas/testsuite/gas/aarch64/illegal.l
@@ -548,4 +548,7 @@
[^:]*:538: Error: .*`mov x0,##5'
[^:]*:540: Error: .*`msr daifset,x0'
[^:]*:541: Error: .*`msr daifclr,x0'
-[^:]*:546: Error: .*
+[^:]*:543: Error: .*`fmov s0,#0x11'
+[^:]*:544: Error: .*`fmov s0,#0xC0280000C1400000'
+[^:]*:545: Error: .*`fmov d0,#0xC02f800000000000'
+[^:]*:550: Error: .*
diff --git a/gas/testsuite/gas/aarch64/illegal.s b/gas/testsuite/gas/aarch64/illegal.s
index c13dec4..d2bc08a 100644
--- a/gas/testsuite/gas/aarch64/illegal.s
+++ b/gas/testsuite/gas/aarch64/illegal.s
@@ -540,6 +540,10 @@
msr daifset, x0
msr daifclr, x0
+ fmov s0, #0x11
+ fmov s0, #0xC0280000C1400000
+ fmov d0, #0xC02f800000000000
+
// No 16-byte relocation
ldr q0, =one_label