mirror of
https://github.com/bminor/binutils-gdb.git
synced 2026-02-04 20:31:29 +00:00
aarch64: Add support for FEAT_CMH
This patch adds the new instructions from FEAT_CMH These new instructions are hints, STCPH and SHUH. SHUH can have an operand PH or no operand.
This commit is contained in:
@@ -4619,7 +4619,9 @@ parse_hint_opt (const char *name, char **str,
|
||||
&& (o->value != HINT_OPD_C && o->value != HINT_OPD_J
|
||||
&& o->value != HINT_OPD_JC && o->value != HINT_OPD_R))
|
||||
|| ((strcmp ("stshh", name) == 0)
|
||||
&& (o->value != HINT_OPD_KEEP && o->value != HINT_OPD_STRM)))
|
||||
&& (o->value != HINT_OPD_KEEP && o->value != HINT_OPD_STRM))
|
||||
|| ((strcmp ("shuh", name) == 0)
|
||||
&& (o->value != HINT_OPD_PHINT)))
|
||||
return false;
|
||||
|
||||
*str = q;
|
||||
@@ -6436,6 +6438,7 @@ process_omitted_operand (enum aarch64_opnd type, const aarch64_opcode *opcode,
|
||||
break;
|
||||
|
||||
case AARCH64_OPND_BTI_TARGET:
|
||||
case AARCH64_OPND_SHUH_PHINT:
|
||||
operand->hint_option = aarch64_hint_options + default_value;
|
||||
break;
|
||||
|
||||
@@ -8314,6 +8317,7 @@ parse_operands (char *str, const aarch64_opcode *opcode)
|
||||
break;
|
||||
|
||||
case AARCH64_OPND_BTI_TARGET:
|
||||
case AARCH64_OPND_SHUH_PHINT:
|
||||
if (!parse_hint_opt (opcode->name, &str, &(info->hint_option)))
|
||||
goto failure;
|
||||
break;
|
||||
|
||||
4
gas/testsuite/gas/aarch64/cmh-bad.d
Normal file
4
gas/testsuite/gas/aarch64/cmh-bad.d
Normal file
@@ -0,0 +1,4 @@
|
||||
#name: Negative test of CMH instructions.
|
||||
#as: -march=armv8-a
|
||||
#source: cmh-bad.s
|
||||
#error_output: cmh-bad.l
|
||||
3
gas/testsuite/gas/aarch64/cmh-bad.l
Normal file
3
gas/testsuite/gas/aarch64/cmh-bad.l
Normal file
@@ -0,0 +1,3 @@
|
||||
[^ :]+: Assembler messages:
|
||||
[^ :]+:[0-9]+: Error: operand 1 must be an optional priority hint \(ph\) -- `shuh p'
|
||||
[^ :]+:[0-9]+: Error: unexpected characters following instruction -- `stcph ph'
|
||||
3
gas/testsuite/gas/aarch64/cmh-bad.s
Normal file
3
gas/testsuite/gas/aarch64/cmh-bad.s
Normal file
@@ -0,0 +1,3 @@
|
||||
a:
|
||||
shuh p
|
||||
stcph ph
|
||||
11
gas/testsuite/gas/aarch64/cmh.d
Normal file
11
gas/testsuite/gas/aarch64/cmh.d
Normal file
@@ -0,0 +1,11 @@
|
||||
#as: -march=armv8-a
|
||||
#objdump: -dr
|
||||
|
||||
.*: file format .*
|
||||
|
||||
Disassembly of section \.text:
|
||||
|
||||
0+ <.*>:
|
||||
.*: d503265f shuh
|
||||
.*: d503267f shuh ph
|
||||
.*: d503269f stcph
|
||||
4
gas/testsuite/gas/aarch64/cmh.s
Normal file
4
gas/testsuite/gas/aarch64/cmh.s
Normal file
@@ -0,0 +1,4 @@
|
||||
a:
|
||||
shuh
|
||||
shuh ph
|
||||
stcph
|
||||
@@ -68,9 +68,9 @@ Disassembly of section \.text:
|
||||
.*: d50325ff hint #0x2f
|
||||
.*: d503261f (hint #0x30|stshh keep)
|
||||
.*: d503263f (hint #0x31|stshh strm)
|
||||
.*: d503265f hint #0x32
|
||||
.*: d503267f hint #0x33
|
||||
.*: d503269f hint #0x34
|
||||
.*: d503265f (hint #0x32|shuh)
|
||||
.*: d503267f (hint #0x33|shuh ph)
|
||||
.*: d503269f (hint #0x34|stcph)
|
||||
.*: d50326bf hint #0x35
|
||||
.*: d50326df hint #0x36
|
||||
.*: d50326ff hint #0x37
|
||||
|
||||
Reference in New Issue
Block a user