summaryrefslogtreecommitdiff
path: root/libphobos/libdruntime
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2020-10-12 19:09:13 +0100
committerMaciej W. Rozycki <macro@linux-mips.org>2020-10-15 15:43:03 +0100
commit3de9bf7df48f4e6943ca2fcf463ea513f262f685 (patch)
tree7956dd76141fc88cbf811dbc0f8ffdc9caa46be9 /libphobos/libdruntime
parent12c9413228d2955126ff5c45194f8aacf1aa81f6 (diff)
downloadgcc-3de9bf7df48f4e6943ca2fcf463ea513f262f685.tar.gz
MIPS/libphobos: Fix switchcontext.S assembly for MIPS I ISA
Correct MIPS I assembly build errors in switchcontext.S: .../libphobos/libdruntime/config/mips/switchcontext.S: Assembler messages: .../libphobos/libdruntime/config/mips/switchcontext.S:50: Error: opcode not supported on this processor: mips1 (mips1) `sdc1 $f20,(0*8-((6*8+4+(-6*8+4&7))))($sp)' etc., due to the use of the MIPS II LDC1 and SDC1 hardware instructions for FP register load and store operations. Instead use the L.D and S.D generic assembly instructions, which are strict aliases for the LDC1 and SDC1 instructions respectively and produce identical machine code where the assembly for the MIPS II or a higher ISA has been requested, however they become assembly macros and expand to compatible sequences of LWC1 and SWC1 hardware instructions where the assembly for the MIPS I ISA is in effect. libphobos/ * libdruntime/config/mips/switchcontext.S [__mips_hard_float]: Use L.D and S.D generic assembly instructions rather than LDC1 and SDC1 MIPS II hardware instructions. (cherry picked from commit 6f0a4ae1274cc41ee9d9a142af5e51e416a2c08d)
Diffstat (limited to 'libphobos/libdruntime')
-rw-r--r--libphobos/libdruntime/config/mips/switchcontext.S24
1 files changed, 12 insertions, 12 deletions
diff --git a/libphobos/libdruntime/config/mips/switchcontext.S b/libphobos/libdruntime/config/mips/switchcontext.S
index 7604ba1ebbd..43080b06b91 100644
--- a/libphobos/libdruntime/config/mips/switchcontext.S
+++ b/libphobos/libdruntime/config/mips/switchcontext.S
@@ -47,12 +47,12 @@ fiber_switchContext:
#ifdef __mips_hard_float
#define ALIGN8(val) (val + (-val & 7))
#define BELOW (ALIGN8(6 * 8 + 4))
- sdc1 $f20, (0 * 8 - BELOW)($sp)
- sdc1 $f22, (1 * 8 - BELOW)($sp)
- sdc1 $f24, (2 * 8 - BELOW)($sp)
- sdc1 $f26, (3 * 8 - BELOW)($sp)
- sdc1 $f28, (4 * 8 - BELOW)($sp)
- sdc1 $f30, (5 * 8 - BELOW)($sp)
+ s.d $f20, (0 * 8 - BELOW)($sp)
+ s.d $f22, (1 * 8 - BELOW)($sp)
+ s.d $f24, (2 * 8 - BELOW)($sp)
+ s.d $f26, (3 * 8 - BELOW)($sp)
+ s.d $f28, (4 * 8 - BELOW)($sp)
+ s.d $f30, (5 * 8 - BELOW)($sp)
#endif
sw $ra, -4($sp)
@@ -72,12 +72,12 @@ fiber_switchContext:
move $sp, $a1
#ifdef __mips_hard_float
- ldc1 $f20, (0 * 8 - BELOW)($sp)
- ldc1 $f22, (1 * 8 - BELOW)($sp)
- ldc1 $f24, (2 * 8 - BELOW)($sp)
- ldc1 $f26, (3 * 8 - BELOW)($sp)
- ldc1 $f28, (4 * 8 - BELOW)($sp)
- ldc1 $f30, (5 * 8 - BELOW)($sp)
+ l.d $f20, (0 * 8 - BELOW)($sp)
+ l.d $f22, (1 * 8 - BELOW)($sp)
+ l.d $f24, (2 * 8 - BELOW)($sp)
+ l.d $f26, (3 * 8 - BELOW)($sp)
+ l.d $f28, (4 * 8 - BELOW)($sp)
+ l.d $f30, (5 * 8 - BELOW)($sp)
#endif
lw $ra, -4($sp)