* config/tc-sh.c (parse_at): @(symbol,pc) is A_DISP_PC again,
authorJoern Rennecke <joern.rennecke@embecosm.com>
Thu, 6 Jun 2002 17:29:55 +0000 (17:29 +0000)
committerJoern Rennecke <joern.rennecke@embecosm.com>
Thu, 6 Jun 2002 17:29:55 +0000 (17:29 +0000)
but warn about it.
* testsuite/gas/sh/pcrel.s: Also test @(symbol,pc).
* testsuite/gas/sh/pcrel.d: Update.
* testsuite/gas/sh/pcrel.l: New file.

gas/ChangeLog
gas/config/tc-sh.c
gas/testsuite/gas/sh/pcrel.d
gas/testsuite/gas/sh/pcrel.l [new file with mode: 0644]
gas/testsuite/gas/sh/pcrel.s

index f165585657a326a6f0b81e7d8356e96d9c70671d..44d33047b6fa19c37a6d12880ead96015d2d37af 100644 (file)
@@ -1,3 +1,11 @@
+Thu Jun  6 17:42:12 2002  J"orn Rennecke <joern.rennecke@superh.com>
+
+       * config/tc-sh.c (parse_at): @(symbol,pc) is A_DISP_PC again,
+       but warn about it.
+       * testsuite/gas/sh/pcrel.s: Also test @(symbol,pc).
+       * testsuite/gas/sh/pcrel.d: Update.
+       * testsuite/gas/sh/pcrel.l: New file.
+
 2002-06-06  Daniel Jacobowitz  <drow@mvista.com>
 
        * tc-mips.c (mips_after_parse_args): Always set mips_opts.ase_mips3d
index d411379bc9ebb29c272b2d874b66e850a2d2b93f..cd6f90c861a7f1cec98bf58d1097878cf528ac1b 100644 (file)
@@ -1383,10 +1383,18 @@ parse_at (src, op)
                }
              else if (mode == A_PC)
                {
-                 op->type = A_DISP_PC_ABS;
-                 /* Such operands don't get corrected for PC==.+4, so
-                    make the correction here.  */
-                 op->immediate.X_add_number -= 4;
+                 if (op->immediate.X_op == O_symbol)
+                   {
+                     op->type = A_DISP_PC;
+                     as_warn (_("Deprecated syntax."));
+                   }
+                 else
+                   {
+                     op->type = A_DISP_PC_ABS;
+                     /* Such operands don't get corrected for PC==.+4, so
+                        make the correction here.  */
+                     op->immediate.X_add_number -= 4;
+                   }
                }
              else
                {
index 2501fbe1d2c8cb56e3228864e7da220bd62d8ed9..9e81b60cdf8fe2dd7e37b302cd961c3e7433e92a 100644 (file)
@@ -1,21 +1,24 @@
 #as: -big
 #objdump: -d
 #name: PC-relative loads
+#stderr: pcrel.l
 
 .*:     file format .*sh.*
 
 Disassembly of section .text:
 
 00000000 <code>:
-   0:  d1 03           mov\.l  10 <litpool>,r1 ! 0xfffffff0
-   2:  d1 03           mov\.l  10 <litpool>,r1 ! 0xfffffff0
-   4:  c7 02           mova    10 <litpool>,r0
-   6:  61 02           mov\.l  @r0,r1
-   8:  d1 01           mov\.l  10 <litpool>,r1 ! 0xfffffff0
-   a:  01 03           bsrf    r1
-   c:  00 09           nop     
-   e:  00 09           nop     
+   0:  d0 04           mov\.l  14 <litpool>,r0 ! 0xffffffec
+   2:  d1 05           mov\.l  18 <litpool\+0x4>,r1
+   4:  d1 03           mov\.l  14 <litpool>,r1 ! 0xffffffec
+   6:  d1 03           mov\.l  14 <litpool>,r1 ! 0xffffffec
+   8:  c7 02           mova    14 <litpool>,r0
+   a:  61 02           mov\.l  @r0,r1
+   c:  d1 01           mov\.l  14 <litpool>,r1 ! 0xffffffec
+   e:  01 03           bsrf    r1
+  10:  00 09           nop     
+  12:  00 09           nop     
 
-00000010 <litpool>:
-  10:  ff ff           \.word 0xffff
-  12:  ff f0           \.word 0xfff0
+00000014 <litpool>:
+  14:  ff ff           \.word 0xffff
+  16:  ff ec           \.word 0xffec
diff --git a/gas/testsuite/gas/sh/pcrel.l b/gas/testsuite/gas/sh/pcrel.l
new file mode 100644 (file)
index 0000000..25b2eef
--- /dev/null
@@ -0,0 +1,3 @@
+[^:]*pcrel.s: Assembler messages:
+[^:]*pcrel(-coff)?\.s:5: Warning: Deprecated syntax.
+[^:]*pcrel(-coff)?\.s:6: Warning: Deprecated syntax.
index d2df07a93b9bc6ba35a006de28cf39c7d7b95b25..20c394ac8387d72cd1d7a3adf9d9691d9b161048 100644 (file)
@@ -2,6 +2,8 @@
 
        .p2align 2
 code:
+       mov.l   @(litpool,pc), r0
+       mov.l   @(litpool+4,pc), r1
        mov.l   litpool, r1
        mov.l   @(14,pc), r1
        mova    @(litpool-.,pc), r0
This page took 0.031007 seconds and 4 git commands to generate.