arm-asm: Add ldc2, ldc2l, stc2, stc2l
This commit is contained in:
parent
7900a6bb61
commit
31dde11ad5
2 changed files with 25 additions and 1 deletions
22
arm-asm.c
22
arm-asm.c
|
@ -1411,7 +1411,22 @@ static void asm_coprocessor_data_transfer_opcode(TCCState *s1, int token)
|
|||
|
||||
// TODO: Support options.
|
||||
|
||||
switch (ARM_INSTRUCTION_GROUP(token)) {
|
||||
if (token == TOK_ASM_ldc2 || token == TOK_ASM_stc2 || token == TOK_ASM_ldc2l || token == TOK_ASM_stc2l) {
|
||||
switch (token) {
|
||||
case TOK_ASM_ldc2l:
|
||||
long_transfer = 1; // long transfer
|
||||
/* fallthrough */
|
||||
case TOK_ASM_ldc2:
|
||||
asm_emit_coprocessor_data_transfer(0xF, coprocessor, coprocessor_destination_register, &ops[1], &ops[2], op2_minus, preincrement, exclam, long_transfer, 1);
|
||||
break;
|
||||
case TOK_ASM_stc2l:
|
||||
long_transfer = 1; // long transfer
|
||||
/* fallthrough */
|
||||
case TOK_ASM_stc2:
|
||||
asm_emit_coprocessor_data_transfer(0xF, coprocessor, coprocessor_destination_register, &ops[1], &ops[2], op2_minus, preincrement, exclam, long_transfer, 0);
|
||||
break;
|
||||
}
|
||||
} else switch (ARM_INSTRUCTION_GROUP(token)) {
|
||||
case TOK_ASM_stcleq:
|
||||
long_transfer = 1;
|
||||
/* fallthrough */
|
||||
|
@ -1636,6 +1651,11 @@ ST_FUNC void asm_opcode(TCCState *s1, int token)
|
|||
switch (token) {
|
||||
case TOK_ASM_cdp2:
|
||||
return asm_coprocessor_opcode(s1, token);
|
||||
case TOK_ASM_ldc2:
|
||||
case TOK_ASM_ldc2l:
|
||||
case TOK_ASM_stc2:
|
||||
case TOK_ASM_stc2l:
|
||||
return asm_coprocessor_data_transfer_opcode(s1, token);
|
||||
default:
|
||||
expect("instruction");
|
||||
return;
|
||||
|
|
|
@ -73,6 +73,10 @@
|
|||
/* instructions that have no condition code */
|
||||
|
||||
DEF_ASM(cdp2)
|
||||
DEF_ASM(ldc2)
|
||||
DEF_ASM(ldc2l)
|
||||
DEF_ASM(stc2)
|
||||
DEF_ASM(stc2l)
|
||||
|
||||
#define ARM_INSTRUCTION_GROUP(tok) ((((tok) - TOK_ASM_nopeq) & 0xFFFFFFF0) + TOK_ASM_nopeq)
|
||||
|
||||
|
|
Loading…
Reference in a new issue