---
arm-asm.c | 22 +++++++++++++++++++++-
arm-tok.h | 4 ++++
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/arm-asm.c b/arm-asm.c
index 1f0bac9..2b650c3 100644
--- a/arm-asm.c
+++ b/arm-asm.c
@@ -1410,7 +1410,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 */
@@ -1635,6 +1650,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;
diff --git a/arm-tok.h b/arm-tok.h
index 66f7178..28794e2 100644
--- a/arm-tok.h
+++ b/arm-tok.h
@@ -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)
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel