VFP vmls/vmls encoding fix

View: New views
1 Messages — Rating Filter:   Alert me  

VFP vmls/vmls encoding fix

by Paul Brook :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The patch below fixes a bug in the encoding of the VFP variants of the ARM
vmla/vmls instructions.

Tested on arm-none-eabi
Applied to CVS head

Paul

2009-11-03  Paul Brook  <paul@...>

        gas/
        * config/tc-arm.c (do_vfp_nsyn_mla_mls): Fix vmls excoding.

        gas/testsuite/
        * gas/arm/vfp-neon-syntax.d: Update expected results.
        * gas/arm/vfp-neon-syntax_t2.d: Update expected results.

Index: gas/testsuite/gas/arm/vfp-neon-syntax.d
===================================================================
--- gas/testsuite/gas/arm/vfp-neon-syntax.d (revision 267369)
+++ gas/testsuite/gas/arm/vfp-neon-syntax.d (working copy)
@@ -61,10 +61,10 @@ Disassembly of section .text:
 0[0-9a-f]+ <[^>]+> ee010b02 (vmla\.f64|fmacd) d0, d1, d2
 0[0-9a-f]+ <[^>]+> 0e000a81 (vmlaeq\.f32|fmacseq) s0, s1, s2
 0[0-9a-f]+ <[^>]+> 0e010b02 (vmlaeq\.f64|fmacdeq) d0, d1, d2
-0[0-9a-f]+ <[^>]+> ee100a81 (vnmls\.f32|fmscs) s0, s1, s2
-0[0-9a-f]+ <[^>]+> ee110b02 (vnmls\.f64|fmscd) d0, d1, d2
-0[0-9a-f]+ <[^>]+> 0e100a81 (vnmlseq\.f32|fmscseq) s0, s1, s2
-0[0-9a-f]+ <[^>]+> 0e110b02 (vnmlseq\.f64|fmscdeq) d0, d1, d2
+0[0-9a-f]+ <[^>]+> ee000ac1 (vmls\.f32|fmscs) s0, s1, s2
+0[0-9a-f]+ <[^>]+> ee010b42 (vmls\.f64|fmscd) d0, d1, d2
+0[0-9a-f]+ <[^>]+> 0e000ac1 (vmlseq\.f32|fmscseq) s0, s1, s2
+0[0-9a-f]+ <[^>]+> 0e010b42 (vmlseq\.f64|fmscdeq) d0, d1, d2
 0[0-9a-f]+ <[^>]+> ee300a81 (vadd\.f32|fadds) s0, s1, s2
 0[0-9a-f]+ <[^>]+> ee310b02 (vadd\.f64|faddd) d0, d1, d2
 0[0-9a-f]+ <[^>]+> 0e300a81 (vaddeq\.f32|faddseq) s0, s1, s2
Index: gas/testsuite/gas/arm/vfp-neon-syntax_t2.d
===================================================================
--- gas/testsuite/gas/arm/vfp-neon-syntax_t2.d (revision 267369)
+++ gas/testsuite/gas/arm/vfp-neon-syntax_t2.d (working copy)
@@ -73,11 +73,11 @@ Disassembly of section \.text:
 0[0-9a-f]+ <[^>]+> bf04       itt eq
 0[0-9a-f]+ <[^>]+> ee00 0a81 (vmlaeq\.f32|fmacseq) s0, s1, s2
 0[0-9a-f]+ <[^>]+> ee01 0b02 (vmlaeq\.f64|fmacdeq) d0, d1, d2
-0[0-9a-f]+ <[^>]+> ee10 0a81 (vnmls\.f32|fmscs) s0, s1, s2
-0[0-9a-f]+ <[^>]+> ee11 0b02 (vnmls\.f64|fmscd) d0, d1, d2
+0[0-9a-f]+ <[^>]+> ee00 0ac1 (vmls\.f32|fmscs) s0, s1, s2
+0[0-9a-f]+ <[^>]+> ee01 0b42 (vmls\.f64|fmscd) d0, d1, d2
 0[0-9a-f]+ <[^>]+> bf04       itt eq
-0[0-9a-f]+ <[^>]+> ee10 0a81 (vnmlseq\.f32|fmscseq) s0, s1, s2
-0[0-9a-f]+ <[^>]+> ee11 0b02 (vnmlseq\.f64|fmscdeq) d0, d1, d2
+0[0-9a-f]+ <[^>]+> ee00 0ac1 (vmlseq\.f32|fmscseq) s0, s1, s2
+0[0-9a-f]+ <[^>]+> ee01 0b42 (vmlseq\.f64|fmscdeq) d0, d1, d2
 0[0-9a-f]+ <[^>]+> ee30 0a81 (vadd\.f32|fadds) s0, s1, s2
 0[0-9a-f]+ <[^>]+> ee31 0b02 (vadd\.f64|faddd) d0, d1, d2
 0[0-9a-f]+ <[^>]+> bf04       itt eq
Index: gas/config/tc-arm.c
===================================================================
--- gas/config/tc-arm.c (revision 267369)
+++ gas/config/tc-arm.c (working copy)
@@ -12144,14 +12144,14 @@ do_vfp_nsyn_mla_mls (enum neon_shape rs)
       if (is_mla)
         do_vfp_nsyn_opcode ("fmacs");
       else
-        do_vfp_nsyn_opcode ("fmscs");
+        do_vfp_nsyn_opcode ("fnmacs");
     }
   else
     {
       if (is_mla)
         do_vfp_nsyn_opcode ("fmacd");
       else
-        do_vfp_nsyn_opcode ("fmscd");
+        do_vfp_nsyn_opcode ("fnmacd");
     }
 }