History

arm-asm: Raise error if user tries to use PC for offset register of single data transfer

Danny Milosavljevic committed 5 years ago

Commit 757eccd1 parent 00783951 file · +4 −0Browse files

Unified · Split

arm-asm.c+4−0
@@ -1016,6 +1016,10 @@ static void asm_single_data_transfer_opcode(TCCState *s1, int token) · 1015 unmodified lines
10161016 }
10171017 parse_operand(s1, &ops[2]);
10181018 if (ops[2].type == OP_REG32) {
1019+ if (ops[2].reg == 15) {
1020+ tcc_error("Using 'pc' for register offset in '%s' is not implemented by ARM", get_tok_str(token, NULL));
1021+ return;
1022+ }
10191023 if (tok == ',') {
10201024 next();
10211025 opcode |= asm_parse_optional_shift(s1, &nb_shift, &shift);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t