aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Chambers <[email protected]>2021-10-14 20:03:43 +1300
committerAndrew Chambers <[email protected]>2021-10-14 20:03:43 +1300
commitad8d5f5f2689c21c3d3ea7d4fec0e2747f53883f (patch)
tree80ea491c90708cb46409f6633f5336343a99f3a7
parenta4289ade4c65730124e10849b1544db374cf5062 (diff)
Update conditions to agree with clang.
-rw-r--r--main.c4
-rw-r--r--parse.c4
-rw-r--r--test/test.sh1
3 files changed, 5 insertions, 4 deletions
diff --git a/main.c b/main.c
index 42950c3..5851844 100644
--- a/main.c
+++ b/main.c
@@ -792,8 +792,8 @@ static void assemble(void) {
case ASM_JMP: {
static uint8_t variant2op[31] = {
0xe9, 0x84, 0x88, 0x8b, 0x8a, 0x8a, 0x80, 0x85, 0x89, 0x8b, 0x81,
- 0x8f, 0x8d, 0x8c, 0x8e, 0x85, 0x83, 0x83, 0x82, 0x86, 0x8e, 0x8c,
- 0x8d, 0x8f, 0x84, 0x84, 0x82, 0x86, 0x82, 0x83, 0x87,
+ 0x8f, 0x8d, 0x8c, 0x8e, 0x85, 0x83, 0x87, 0x83, 0x82, 0x86, 0x8e,
+ 0x8c, 0x8d, 0x8f, 0x84, 0x82, 0x86, 0x82, 0x83, 0x87,
};
if (v->jmp.variant)
sb(0x0f);
diff --git a/parse.c b/parse.c
index 62108a2..c34923d 100644
--- a/parse.c
+++ b/parse.c
@@ -62,14 +62,14 @@ static String decodestring(char *s) {
} else if (*s == 'x') {
s++;
c = strtoul(s, &end, 16);
- s = end-1;
+ s = end - 1;
} else if (*s == 'r') {
c = '\r';
} else if (*s == 'n') {
c = '\n';
} else if (*s == 't') {
c = '\t';
- } else if (*s == '\\'){
+ } else if (*s == '\\') {
c = '\\';
} else {
unreachable();
diff --git a/test/test.sh b/test/test.sh
index 9f2cc0f..08db8b8 100644
--- a/test/test.sh
+++ b/test/test.sh
@@ -181,6 +181,7 @@ for cc in $conditioncodes
do
t "set${cc} %al"
t "set${cc} (%rax)"
+ t "j${cc} $0xefffffff"
done
for op in sal sar shl shr