Skip to content

Commit b21071d

Browse files
committed
fixed error reporting for P2_CONST_DST_OK instructions
1 parent 8d6fb81 commit b21071d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Version 7.3.0
55
- Fix parsing of `[++]` and `[--]` as pre operators
66
- Fixed error reporting around __builtin_printf
77
- Fixed callpa #x, ##longx (keep 20 bits for addresses, not 18)
8+
- Fixed error reporting for P2_DST_CONST_OK instructions
89
- Implemented `%interface` for Spin2
910
- Updated __builtin_printf to handle %X
1011

backends/dat/outdat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1920,7 +1920,7 @@ AssembleInstruction(Flexbuf *f, AST *ast, Flexbuf *relocs)
19201920
}
19211921
}
19221922
if (dst > 511) {
1923-
if (immmask & P2_IMM_DST) {
1923+
if ((immmask & P2_IMM_DST) || instr->ops == P2_DST_CONST_OK) {
19241924
ERROR(line, "Destination operand too big for %s", instr->name);
19251925
} else {
19261926
ERROR(line, "Destination operand of %s does not appear to be a register", instr->name);

0 commit comments

Comments
 (0)