diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2013-06-20 19:25:20 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2013-06-20 19:25:20 +0000 |
commit | c62781705e9d1caf76f8617664e0e8419bea552c (patch) | |
tree | 353e8a4717c71990b9f0dd91a9740e4876a01518 /gas/testsuite | |
parent | b9eead841d08c769b08fa42a7e9b68c023374dc2 (diff) | |
download | gdb-c62781705e9d1caf76f8617664e0e8419bea552c.zip gdb-c62781705e9d1caf76f8617664e0e8419bea552c.tar.gz gdb-c62781705e9d1caf76f8617664e0e8419bea552c.tar.bz2 |
gas/
* config/tc-mips.c (ISA_SUPPORTS_SMARTMIPS, ISA_SUPPORTS_DSP_ASE)
(ISA_SUPPORTS_DSP64_ASE, ISA_SUPPORTS_DSPR2_ASE, ISA_SUPPORTS_EVA_ASE)
(ISA_SUPPORTS_MT_ASE, ISA_SUPPORTS_MCU_ASE, ISA_SUPPORTS_VIRT_ASE)
(ISA_SUPPORTS_VIRT64_ASE): Delete.
(mips_ase): New structure.
(mips_ases): New table.
(FP64_ASES): New macro.
(mips_ase_groups): New array.
(mips_isa_rev, mips_ase_mask, mips_check_isa_supports_ase)
(mips_check_isa_supports_ases, mips_set_ase, mips_lookup_ase): New
functions.
(is_opcode_valid): Use mips_ases to get the 64-bit ASE flags.
(md_parse_option): Use mips_ases and mips_set_ase instead of
separate case statements for each ASE option.
(mips_after_parse_args): Use FP64_ASES. Use
mips_check_isa_supports_ases to check the ASEs against
other options.
(s_mipsset): Use mips_ases and mips_set_ase instead of
separate if statements for each ASE option. Use
mips_check_isa_supports_ases, even when a non-ASE option
is specified.
gas/testsuite/
* gas/mips/ase-errors-1.s, gas/mips/ase-errors-1.l,
gas/mips/ase-errors-2.s, gas/mips/ase-errors-2.l,
gas/mips/ase-errors-3.s, gas/mips/ase-errors-3.l,
gas/mips/ase-errors-4.s, gas/mips/ase-errors-4.l: New tests.
* gas/mips/mips.exp: Run them.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/ase-errors-1.l | 42 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/ase-errors-1.s | 115 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/ase-errors-2.l | 34 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/ase-errors-2.s | 99 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/ase-errors-3.l | 30 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/ase-errors-3.s | 77 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/ase-errors-4.l | 27 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/ase-errors-4.s | 75 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/mips.exp | 5 |
10 files changed, 512 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index c9aeb76..26ef7c4 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2013-06-20 Richard Sandiford <rdsandiford@googlemail.com> + + * gas/mips/ase-errors-1.s, gas/mips/ase-errors-1.l, + gas/mips/ase-errors-2.s, gas/mips/ase-errors-2.l, + gas/mips/ase-errors-3.s, gas/mips/ase-errors-3.l, + gas/mips/ase-errors-4.s, gas/mips/ase-errors-4.l: New tests. + * gas/mips/mips.exp: Run them. + 2013-06-18 Richard Sandiford <rdsandiford@googlemail.com> * gas/mips/eva.d: Use -32. diff --git a/gas/testsuite/gas/mips/ase-errors-1.l b/gas/testsuite/gas/mips/ase-errors-1.l new file mode 100644 index 0000000..bfa7691 --- /dev/null +++ b/gas/testsuite/gas/mips/ase-errors-1.l @@ -0,0 +1,42 @@ +.*Assembler messages: +.*:6: Error: Opcode not supported.* `ldx \$4,\$5\(\$6\)' +.*:7: Error: Opcode not supported.* `absq_s\.qb \$3,\$4' +.*:9: Warning: The `dsp' extension requires MIPS32 revision 2 or greater +.*:11: Error: Opcode not supported.* `ldx \$4,\$5\(\$6\)' +.*:12: Error: Opcode not supported.* `absq_s\.qb \$3,\$4' +.*:14: Error: Opcode not supported.* `lbux \$4,\$5\(\$6\)' +.*:15: Error: Opcode not supported.* `ldx \$4,\$5\(\$6\)' +.*:16: Error: Opcode not supported.* `absq_s\.qb \$3,\$4' +# ---------------------------------------------------------------------------- +.*:22: Error: Opcode not supported.* `ldx \$4,\$5\(\$6\)' +.*:25: Warning: The `dspr2' extension requires MIPS32 revision 2 or greater +.*:27: Error: Opcode not supported.* `ldx \$4,\$5\(\$6\)' +.*:30: Error: Opcode not supported.* `lbux \$4,\$5\(\$6\)' +.*:31: Error: Opcode not supported.* `ldx \$4,\$5\(\$6\)' +.*:32: Error: Opcode not supported.* `absq_s\.qb \$3,\$4' +# ---------------------------------------------------------------------------- +.*:39: Warning: The `mcu' extension requires MIPS32 revision 2 or greater +.*:42: Error: Opcode not supported.* `aclr 4,100\(\$4\)' +# ---------------------------------------------------------------------------- +.*:46: Warning: The 32-bit MIPS architecture does not support the `mdmx' extension +.*:48: Warning: The `mdmx' extension requires 64-bit FPRs +.*:51: Error: Opcode not supported.* `add.ob \$f4,\$f6,\$f8' +# ---------------------------------------------------------------------------- +.*:57: Warning: The `mips3d' extension requires 64-bit FPRs +.*:58: Warning: The `mips3d' extension requires MIPS32 revision 2 or greater +.*:61: Error: Opcode not supported.* `addr.ps \$f4,\$f6,\$f8' +# ---------------------------------------------------------------------------- +.*:68: Warning: The `mt' extension requires MIPS32 revision 2 or greater +.*:71: Error: Opcode not supported.* `dmt *' +# ---------------------------------------------------------------------------- +.*:77: Warning: The `smartmips' extension requires MIPS32 revision 1 or greater +.*:80: Error: Opcode not supported.* `maddp \$4,\$5' +# ---------------------------------------------------------------------------- +.*:86: Error: Opcode not supported.* `dmfgc0 \$3,\$29' +.*:88: Warning: The `virt' extension requires MIPS32 revision 2 or greater +.*:90: Error: Opcode not supported.* `dmfgc0 \$3,\$29' +.*:92: Error: Opcode not supported.* `hypcall *' +.*:93: Error: Opcode not supported.* `dmfgc0 \$3,\$29' +# ---------------------------------------------------------------------------- +.*:100: Warning: The `eva' extension requires MIPS32 revision 2 or greater +.*:103: Error: Opcode not supported.* `lbue \$4,16\(\$5\)' diff --git a/gas/testsuite/gas/mips/ase-errors-1.s b/gas/testsuite/gas/mips/ase-errors-1.s new file mode 100644 index 0000000..c5201c3 --- /dev/null +++ b/gas/testsuite/gas/mips/ase-errors-1.s @@ -0,0 +1,115 @@ + .set nomicromips + .set mips32r2 + .set fp=64 + .set dsp # OK + lbux $4,$5($6) # OK + ldx $4,$5($6) # ERROR: 64-bit only + absq_s.qb $3,$4 # ERROR: dspr2 not enabled + .set fp=32 # OK + .set mips32 # ERROR: too low + lbux $4,$5($6) # OK + ldx $4,$5($6) # ERROR: 64-bit only + absq_s.qb $3,$4 # ERROR: dspr2 not enabled + .set nodsp + lbux $4,$5($6) # ERROR: dsp not enabled + ldx $4,$5($6) # ERROR: dsp not enabled + absq_s.qb $3,$4 # ERROR: dspr2 not enabled + + .set mips32r2 + .set fp=64 + .set dspr2 # OK + lbux $4,$5($6) # OK + ldx $4,$5($6) # ERROR: 64-bit only + absq_s.qb $3,$4 # OK + .set fp=32 # OK + .set mips32 # ERROR: too low + lbux $4,$5($6) # OK + ldx $4,$5($6) # ERROR: 64-bit only + absq_s.qb $3,$4 # OK + .set nodspr2 + lbux $4,$5($6) # ERROR: dsp not enabled + ldx $4,$5($6) # ERROR: dsp not enabled + absq_s.qb $3,$4 # ERROR: dspr2 not enabled + + .set mips32r2 + .set fp=64 + .set mcu # OK + aclr 4,100($4) # OK + .set fp=32 # OK + .set mips32 # ERROR: too low + aclr 4,100($4) # OK + .set nomcu + aclr 4,100($4) # ERROR: mcu not enabled + + .set mips32r2 + .set fp=64 + .set mdmx # ERROR: needs a 64-bit target + add.ob $f4,$f6,$f8 # OK + .set fp=32 # ERROR: needs fp=64 + add.ob $f4,$f6,$f8 # OK + .set nomdmx + add.ob $f4,$f6,$f8 # ERROR: mdmx not enabled + + .set mips32r2 + .set fp=64 + .set mips3d # OK + addr.ps $f4,$f6,$f8 # OK + .set fp=32 # ERROR: needs fp=64 + .set mips32 # ERROR: too low + addr.ps $f4,$f6,$f8 # OK + .set nomips3d + addr.ps $f4,$f6,$f8 # ERROR: mips3d not enabled + + .set mips32r2 + .set fp=64 + .set mt # OK + dmt # OK + .set fp=32 # OK + .set mips32 # ERROR: too low + dmt # OK + .set nomt + dmt # ERROR: mt not enabled + + .set fp=32 + .set mips32 + .set smartmips # OK + maddp $4,$5 # OK + .set mips2 # ERROR: too low + maddp $4,$5 # OK + .set nosmartmips + maddp $4,$5 # ERROR: smartmips not enabled + + .set mips32r2 + .set fp=64 + .set virt # OK + hypcall # OK + dmfgc0 $3, $29 # ERROR: 64-bit only + .set fp=32 # OK + .set mips32 # ERROR: too low + hypcall # OK + dmfgc0 $3, $29 # ERROR: 64-bit only + .set novirt + hypcall # ERROR: virt not enabled + dmfgc0 $3, $29 # ERROR: virt not enabled + + .set mips32r2 + .set fp=64 + .set eva # OK + lbue $4,16($5) # OK + .set fp=32 # OK + .set mips32 # ERROR: too low + lbue $4,16($5) # OK + .set noeva + lbue $4,16($5) # ERROR: eva not enabled + + # There should be no errors after this. + .set fp=32 + .set mips1 + .set dsp + .set dspr2 + .set mcu + .set mdmx + .set mips3d + .set mt + .set smartmips + .set eva diff --git a/gas/testsuite/gas/mips/ase-errors-2.l b/gas/testsuite/gas/mips/ase-errors-2.l new file mode 100644 index 0000000..5e7561d --- /dev/null +++ b/gas/testsuite/gas/mips/ase-errors-2.l @@ -0,0 +1,34 @@ +.*Assembler messages: +.*:6: Error: Opcode not supported.* `absq_s\.qb \$3,\$4' +.*:7: Warning: The `dsp' extension requires MIPS64 revision 2 or greater +.*:10: Error: Opcode not supported.* `absq_s\.qb \$3,\$4' +.*:12: Error: Opcode not supported.* `lbux \$4,\$5\(\$6\)' +.*:13: Error: Opcode not supported.* `ldx \$4,\$5\(\$6\)' +.*:14: Error: Opcode not supported.* `absq_s\.qb \$3,\$4' +# ---------------------------------------------------------------------------- +.*:21: Warning: The `dspr2' extension requires MIPS64 revision 2 or greater +.*:26: Error: Opcode not supported.* `lbux \$4,\$5\(\$6\)' +.*:27: Error: Opcode not supported.* `ldx \$4,\$5\(\$6\)' +.*:28: Error: Opcode not supported.* `absq_s\.qb \$3,\$4' +# ---------------------------------------------------------------------------- +.*:33: Warning: The `mcu' extension requires MIPS64 revision 2 or greater +.*:36: Error: Opcode not supported.* `aclr 4,100\(\$4\)' +# ---------------------------------------------------------------------------- +.*:41: Warning: The `mdmx' extension requires MIPS64 revision 1 or greater +.*:44: Error: Opcode not supported.* `add.ob \$f4,\$f6,\$f8' +# ---------------------------------------------------------------------------- +.*:49: Warning: The `mips3d' extension requires MIPS64 revision 1 or greater +.*:52: Error: Opcode not supported.* `addr.ps \$f4,\$f6,\$f8' +# ---------------------------------------------------------------------------- +.*:57: Warning: The `mt' extension requires MIPS64 revision 2 or greater +.*:60: Error: Opcode not supported.* `dmt *' +# ---------------------------------------------------------------------------- +.*:63: Warning: The 64-bit MIPS architecture does not support the `smartmips' extension +.*:68: Error: Opcode not supported.* `maddp \$4,\$5' +# ---------------------------------------------------------------------------- +.*:74: Warning: The `virt' extension requires MIPS64 revision 2 or greater +.*:78: Error: Opcode not supported.* `hypcall *' +.*:79: Error: Opcode not supported.* `dmfgc0 \$3,\$29' +# ---------------------------------------------------------------------------- +.*:84: Warning: The `eva' extension requires MIPS64 revision 2 or greater +.*:87: Error: Opcode not supported.* `lbue \$4,16\(\$5\)' diff --git a/gas/testsuite/gas/mips/ase-errors-2.s b/gas/testsuite/gas/mips/ase-errors-2.s new file mode 100644 index 0000000..4a17e4f --- /dev/null +++ b/gas/testsuite/gas/mips/ase-errors-2.s @@ -0,0 +1,99 @@ + .set nomicromips + .set mips64r2 + .set dsp # OK + lbux $4,$5($6) # OK + ldx $4,$5($6) # OK + absq_s.qb $3,$4 # ERROR: dspr2 not enabled + .set mips64 # ERROR: too low + lbux $4,$5($6) # OK + ldx $4,$5($6) # OK + absq_s.qb $3,$4 # ERROR: dspr2 not enabled + .set nodsp + lbux $4,$5($6) # ERROR: dsp not enabled + ldx $4,$5($6) # ERROR: dsp not enabled + absq_s.qb $3,$4 # ERROR: dspr2 not enabled + + .set mips64r2 + .set dspr2 # OK + lbux $4,$5($6) # OK + ldx $4,$5($6) # OK + absq_s.qb $3,$4 # OK + .set mips64 # ERROR: too low + lbux $4,$5($6) # OK + ldx $4,$5($6) # OK + absq_s.qb $3,$4 # OK + .set nodspr2 + lbux $4,$5($6) # ERROR: dsp not enabled + ldx $4,$5($6) # ERROR: dsp not enabled + absq_s.qb $3,$4 # ERROR: dspr2 not enabled + + .set mips64r2 + .set mcu # OK + aclr 4,100($4) # OK + .set mips64 # ERROR: too low + aclr 4,100($4) # OK + .set nomcu + aclr 4,100($4) # ERROR: mcu not enabled + + .set mips64 + .set mdmx # OK + add.ob $f4,$f6,$f8 # OK + .set mips4 # ERROR: too low + add.ob $f4,$f6,$f8 # OK + .set nomdmx + add.ob $f4,$f6,$f8 # ERROR: mdmx not enabled + + .set mips64 + .set mips3d # OK + addr.ps $f4,$f6,$f8 # OK + .set mips4 # ERROR: too low + addr.ps $f4,$f6,$f8 # OK + .set nomips3d + addr.ps $f4,$f6,$f8 # ERROR: mips3d not enabled + + .set mips64r2 + .set mt # OK + dmt # OK + .set mips64 # ERROR: too low + dmt # OK + .set nomt + dmt # ERROR: mt not enabled + + .set mips64 + .set smartmips # OK + maddp $4,$5 # OK + .set mips4 # ERROR: too low + maddp $4,$5 # OK + .set nosmartmips + maddp $4,$5 # ERROR: smartmips not enabled + + .set mips64r2 + .set virt # OK + hypcall # OK + dmfgc0 $3, $29 # OK + .set mips64 # ERROR: too low + hypcall # OK + dmfgc0 $3, $29 # OK + .set novirt + hypcall # ERROR: virt not enabled + dmfgc0 $3, $29 # ERROR: virt not enabled + + .set mips64r2 + .set eva # OK + lbue $4,16($5) # OK + .set mips64 # ERROR: too low + lbue $4,16($5) # OK + .set noeva + lbue $4,16($5) # ERROR: eva not enabled + + # There should be no errors after this. + .set fp=32 + .set mips4 + .set dsp + .set dspr2 + .set mcu + .set mdmx + .set mips3d + .set mt + .set smartmips + .set eva diff --git a/gas/testsuite/gas/mips/ase-errors-3.l b/gas/testsuite/gas/mips/ase-errors-3.l new file mode 100644 index 0000000..240ac9b --- /dev/null +++ b/gas/testsuite/gas/mips/ase-errors-3.l @@ -0,0 +1,30 @@ +.*Assembler messages: +.*:5: Error: Unrecognized opcode `ldx \$4,\$5\(\$6\)' +.*:6: Error: Opcode not supported.* `absq_s\.qb \$3,\$4' +.*:9: Error: Opcode not supported.* `lbux \$4,\$5\(\$6\)' +.*:10: Error: Opcode not supported.* `absq_s\.qb \$3,\$4' +# ---------------------------------------------------------------------------- +.*:18: Error: Opcode not supported.* `lbux \$4,\$5\(\$6\)' +.*:19: Error: Opcode not supported.* `absq_s\.qb \$3,\$4' +# ---------------------------------------------------------------------------- +.*:26: Error: Opcode not supported.* `aclr 4,100\(\$4\)' +# ---------------------------------------------------------------------------- +.*:29: Warning: The 32-bit microMIPS architecture does not support the `mdmx' extension +.*:29: Warning: The `mdmx' extension requires 64-bit FPRs +.*:30: Error: Unrecognized opcode `add.ob \$f4,\$f6,\$f8' +# ---------------------------------------------------------------------------- +.*:34: Warning: The 32-bit microMIPS architecture does not support the `mips3d' extension +.*:34: Warning: The `mips3d' extension requires 64-bit FPRs +.*:35: Error: Unrecognized opcode `addr.ps \$f4,\$f6,\$f8' +# ---------------------------------------------------------------------------- +.*:39: Warning: The 32-bit microMIPS architecture does not support the `mt' extension +.*:40: Error: Unrecognized opcode `dmt *' +# ---------------------------------------------------------------------------- +.*:44: Warning: The 32-bit microMIPS architecture does not support the `smartmips' extension +.*:45: Error: Unrecognized opcode `maddp \$4,\$5' +# ---------------------------------------------------------------------------- +.*:51: Error: Opcode not supported.* `dmfgc0 \$3,\$29' +.*:54: Error: Opcode not supported.* `hypcall *' +.*:55: Error: Opcode not supported.* `dmfgc0 \$3,\$29' +# ---------------------------------------------------------------------------- +.*:65: Error: Opcode not supported.* `lbue \$4,16\(\$5\)' diff --git a/gas/testsuite/gas/mips/ase-errors-3.s b/gas/testsuite/gas/mips/ase-errors-3.s new file mode 100644 index 0000000..b184905 --- /dev/null +++ b/gas/testsuite/gas/mips/ase-errors-3.s @@ -0,0 +1,77 @@ + .set micromips + .set mips32r2 + .set dsp # OK + lbux $4,$5($6) # OK + ldx $4,$5($6) # ERROR: micromips doesn't have 64-bit DSPr1 + absq_s.qb $3,$4 # ERROR: dspr2 not enabled + .set mips1 # OK (we assume r2 anyway) + .set nodsp + lbux $4,$5($6) # ERROR: dsp not enabled + absq_s.qb $3,$4 # ERROR: dspr2 not enabled + + .set mips32r2 + .set dspr2 # OK + lbux $4,$5($6) # OK + absq_s.qb $3,$4 # OK + .set mips1 # OK (we assume r2 anyway) + .set nodspr2 + lbux $4,$5($6) # ERROR: dsp not enabled + absq_s.qb $3,$4 # ERROR: dspr2 not enabled + + .set mips32r2 + .set mcu # OK + aclr 4,100($4) # OK + .set mips1 # OK (we assume r2 anyway) + .set nomcu + aclr 4,100($4) # ERROR: mcu not enabled + + .set mips32r2 + .set mdmx # ERROR: not supported at all + add.ob $f4,$f6,$f8 # ERROR: not supported at all + .set nomdmx + + .set mips32r2 + .set mips3d # ERROR: not supported at all + addr.ps $f4,$f6,$f8 # ERROR: not supported at all + .set nomips3d + + .set mips32r2 + .set mt # ERROR: not supported at all + dmt # ERROR: not supported at all + .set nomt + + .set mips32 + .set smartmips # ERROR: not supported at all + maddp $4,$5 # ERROR: not supported at all + .set nosmartmips + + .set mips32r2 + .set virt # OK + hypcall # OK + dmfgc0 $3, $29 # ERROR: 64-bit only + .set mips1 # OK (we assume r2 anyway) + .set novirt + hypcall # ERROR: virt not enabled + dmfgc0 $3, $29 # ERROR: virt not enabled + + .set mips32r2 + .set fp=64 + .set eva # OK + lbue $4,16($5) # OK + .set fp=32 # OK + .set mips1 # OK (we assume r2 anyway) + lbue $4,16($5) # OK + .set noeva + lbue $4,16($5) # ERROR: eva not enabled + + # There should be no errors after this. + .set fp=32 + .set mips1 + .set dsp + .set dspr2 + .set mcu + .set mdmx + .set mips3d + .set mt + .set smartmips + .set eva diff --git a/gas/testsuite/gas/mips/ase-errors-4.l b/gas/testsuite/gas/mips/ase-errors-4.l new file mode 100644 index 0000000..8636786 --- /dev/null +++ b/gas/testsuite/gas/mips/ase-errors-4.l @@ -0,0 +1,27 @@ +.*Assembler messages: +.*:5: Error: Unrecognized opcode `ldx \$4,\$5\(\$6\)' +.*:6: Error: Opcode not supported.* `absq_s\.qb \$3,\$4' +.*:9: Error: Opcode not supported.* `lbux \$4,\$5\(\$6\)' +.*:10: Error: Opcode not supported.* `absq_s\.qb \$3,\$4' +# ---------------------------------------------------------------------------- +.*:18: Error: Opcode not supported.* `lbux \$4,\$5\(\$6\)' +.*:19: Error: Opcode not supported.* `absq_s\.qb \$3,\$4' +# ---------------------------------------------------------------------------- +.*:26: Error: Opcode not supported.* `aclr 4,100\(\$4\)' +# ---------------------------------------------------------------------------- +.*:29: Warning: The 64-bit microMIPS architecture does not support the `mdmx' extension +.*:30: Error: Unrecognized opcode `add.ob \$f4,\$f6,\$f8' +# ---------------------------------------------------------------------------- +.*:34: Warning: The 64-bit microMIPS architecture does not support the `mips3d' extension +.*:35: Error: Unrecognized opcode `addr.ps \$f4,\$f6,\$f8' +# ---------------------------------------------------------------------------- +.*:39: Warning: The 64-bit microMIPS architecture does not support the `mt' extension +.*:40: Error: Unrecognized opcode `dmt *' +# ---------------------------------------------------------------------------- +.*:44: Warning: The 64-bit microMIPS architecture does not support the `smartmips' extension +.*:45: Error: Unrecognized opcode `maddp \$4,\$5' +# ---------------------------------------------------------------------------- +.*:54: Error: Opcode not supported.* `hypcall *' +.*:55: Error: Opcode not supported.* `dmfgc0 \$3,\$29' +# ---------------------------------------------------------------------------- +.*:63: Error: Opcode not supported.* `lbue \$4,16\(\$5\)' diff --git a/gas/testsuite/gas/mips/ase-errors-4.s b/gas/testsuite/gas/mips/ase-errors-4.s new file mode 100644 index 0000000..34ae72f --- /dev/null +++ b/gas/testsuite/gas/mips/ase-errors-4.s @@ -0,0 +1,75 @@ + .set micromips + .set mips64r2 + .set dsp # OK + lbux $4,$5($6) # OK + ldx $4,$5($6) # ERROR: micromips doesn't have 64-bit DSPr1 + absq_s.qb $3,$4 # ERROR: dspr2 not enabled + .set mips3 # OK (we assume r2 anyway) + .set nodsp + lbux $4,$5($6) # ERROR: dsp not enabled + absq_s.qb $3,$4 # ERROR: dspr2 not enabled + + .set mips64r2 + .set dspr2 # OK + lbux $4,$5($6) # OK + absq_s.qb $3,$4 # OK + .set mips3 # OK (we assume r2 anyway) + .set nodspr2 + lbux $4,$5($6) # ERROR: dsp not enabled + absq_s.qb $3,$4 # ERROR: dspr2 not enabled + + .set mips64r2 + .set mcu # OK + aclr 4,100($4) # OK + .set mips3 # OK (we assume r2 anyway) + .set nomcu + aclr 4,100($4) # ERROR: mcu not enabled + + .set mips64r2 + .set mdmx # ERROR: not supported at all + add.ob $f4,$f6,$f8 # ERROR: not supported at all + .set nomdmx + + .set mips64r2 + .set mips3d # ERROR: not supported at all + addr.ps $f4,$f6,$f8 # ERROR: not supported at all + .set nomips3d + + .set mips64r2 + .set mt # ERROR: not supported at all + dmt # ERROR: not supported at all + .set nomt + + .set mips64 + .set smartmips # ERROR: not supported at all + maddp $4,$5 # ERROR: not supported at all + .set nosmartmips + + .set mips64r2 + .set virt # OK + hypcall # OK + dmfgc0 $3, $29 # OK + .set mips3 # OK (we assume r2 anyway) + .set novirt + hypcall # ERROR: virt not enabled + dmfgc0 $3, $29 # ERROR: virt not enabled + + .set mips64r2 + .set eva # OK + lbue $4,16($5) # OK + .set mips3 # OK (we assume r2 anyway) + lbue $4,16($5) # OK + .set noeva + lbue $4,16($5) # ERROR: eva not enabled + + # There should be no errors after this. + .set fp=32 + .set mips4 + .set dsp + .set dspr2 + .set mcu + .set mdmx + .set mips3d + .set mt + .set smartmips + .set eva diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp index 33ba776..ea3a08e 100644 --- a/gas/testsuite/gas/mips/mips.exp +++ b/gas/testsuite/gas/mips/mips.exp @@ -1198,4 +1198,9 @@ if { [istarget mips*-*-vxworks*] } { run_dump_test "r5900-vu0" run_list_test_arches "ext-ill" [mips_arch_list_matching mips64r2] + + run_list_test "ase-errors-1" "-mabi=32 -march=mips1" "ASE errors (1)" + run_list_test "ase-errors-2" "-mabi=o64 -march=mips3" "ASE errors (2)" + run_list_test "ase-errors-3" "-mabi=32 -march=mips1" "ASE errors (3)" + run_list_test "ase-errors-4" "-mabi=o64 -march=mips3" "ASE errors (4)" } |