diff options
| author | Uri Shaked | 2020-01-31 13:44:36 +0200 |
|---|---|---|
| committer | Uri Shaked | 2020-01-31 13:44:36 +0200 |
| commit | 2d4cf8e169cfd7acf6dc09cf9bcc981a98db10e7 (patch) | |
| tree | 96649e3e884d00c0ea1c5c25909cff4f344eb319 /src/utils/assembler.ts | |
| parent | chore: github actions CI config (diff) | |
| download | avr8js-2d4cf8e169cfd7acf6dc09cf9bcc981a98db10e7.tar.gz avr8js-2d4cf8e169cfd7acf6dc09cf9bcc981a98db10e7.tar.bz2 avr8js-2d4cf8e169cfd7acf6dc09cf9bcc981a98db10e7.zip | |
fix(assembler): BRBC/BRBS forward labels fail
Diffstat (limited to 'src/utils/assembler.ts')
| -rw-r--r-- | src/utils/assembler.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/assembler.ts b/src/utils/assembler.ts index 14fd61d..22ac948 100644 --- a/src/utils/assembler.ts +++ b/src/utils/assembler.ts @@ -261,7 +261,7 @@ const OPTABLE: { [key: string]: opcodeHandler } = { BRBC(a, b, byteLoc, labels) { const k = constOrLabel(b, labels, byteLoc + 2); if (isNaN(k)) { - return (l) => OPTABLE['BRBC']('a', b, byteLoc, l) as string; + return (l) => OPTABLE['BRBC'](a, b, byteLoc, l) as string; } let r = 0xf400 | constValue(a, 0, 7); r |= fitTwoC(constValue(k >> 1, -64, 63), 7) << 3; @@ -270,7 +270,7 @@ const OPTABLE: { [key: string]: opcodeHandler } = { BRBS(a, b, byteLoc, labels) { const k = constOrLabel(b, labels, byteLoc + 2); if (isNaN(k)) { - return (l) => OPTABLE['BRBS']('a', b, byteLoc, l) as string; + return (l) => OPTABLE['BRBS'](a, b, byteLoc, l) as string; } let r = 0xf000 | constValue(a, 0, 7); r |= fitTwoC(constValue(k >> 1, -64, 63), 7) << 3; |
