Unified · Split
| @@ -1411,7 +1411,22 @@ static void asm_coprocessor_data_transfer_opcode(TCCState *s1, int token) · 1410 unmodified lines | ||
| 1411 | 1411 | |
| 1412 | 1412 | // TODO: Support options. |
| 1413 | 1413 | |
| 1414 | − switch (ARM_INSTRUCTION_GROUP(token)) { | |
| 1414 | + if (token == TOK_ASM_ldc2 || token == TOK_ASM_stc2 || token == TOK_ASM_ldc2l || token == TOK_ASM_stc2l) { | |
| 1415 | + switch (token) { | |
| 1416 | + case TOK_ASM_ldc2l: | |
| 1417 | + long_transfer = 1; // long transfer | |
| 1418 | + /* fallthrough */ | |
| 1419 | + case TOK_ASM_ldc2: | |
| 1420 | + asm_emit_coprocessor_data_transfer(0xF, coprocessor, coprocessor_destination_register, &ops[1], &ops[2], op2_minus, preincrement, exclam, long_transfer, 1); | |
| 1421 | + break; | |
| 1422 | + case TOK_ASM_stc2l: | |
| 1423 | + long_transfer = 1; // long transfer | |
| 1424 | + /* fallthrough */ | |
| 1425 | + case TOK_ASM_stc2: | |
| 1426 | + asm_emit_coprocessor_data_transfer(0xF, coprocessor, coprocessor_destination_register, &ops[1], &ops[2], op2_minus, preincrement, exclam, long_transfer, 0); | |
| 1427 | + break; | |
| 1428 | + } | |
| 1429 | + } else switch (ARM_INSTRUCTION_GROUP(token)) { | |
| 1415 | 1430 | case TOK_ASM_stcleq: |
| 1416 | 1431 | long_transfer = 1; |
| 1417 | 1432 | /* fallthrough */ |
| @@ -1636,6 +1651,11 @@ ST_FUNC void asm_opcode(TCCState *s1, int token) · 218 unmodified lines | ||
| 1636 | 1651 | switch (token) { |
| 1637 | 1652 | case TOK_ASM_cdp2: |
| 1638 | 1653 | return asm_coprocessor_opcode(s1, token); |
| 1654 | + case TOK_ASM_ldc2: | |
| 1655 | + case TOK_ASM_ldc2l: | |
| 1656 | + case TOK_ASM_stc2: | |
| 1657 | + case TOK_ASM_stc2l: | |
| 1658 | + return asm_coprocessor_data_transfer_opcode(s1, token); | |
| 1639 | 1659 | default: |
| 1640 | 1660 | expect("instruction"); |
| 1641 | 1661 | return; |
| @@ -73,6 +73,10 @@ · 72 unmodified lines | ||
| 73 | 73 | /* instructions that have no condition code */ |
| 74 | 74 | |
| 75 | 75 | DEF_ASM(cdp2) |
| 76 | + DEF_ASM(ldc2) | |
| 77 | + DEF_ASM(ldc2l) | |
| 78 | + DEF_ASM(stc2) | |
| 79 | + DEF_ASM(stc2l) | |
| 76 | 80 | |
| 77 | 81 | #define ARM_INSTRUCTION_GROUP(tok) ((((tok) - TOK_ASM_nopeq) & 0xFFFFFFF0) + TOK_ASM_nopeq) |
| 78 | 82 | |