diff options
author | Mike Pall <mike> | 2013-01-11 12:19:05 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2013-01-11 12:19:05 +0100 |
commit | f22d5d9eef7e0904d0fdfc517759037e04923fed (patch) | |
tree | 735957253f19077a4f3580ef56e1a61a71835b6b /src | |
parent | fb101458c54b695ea125c39019ae58baa782ef46 (diff) | |
download | luajit-f22d5d9eef7e0904d0fdfc517759037e04923fed.tar.gz luajit-f22d5d9eef7e0904d0fdfc517759037e04923fed.tar.bz2 luajit-f22d5d9eef7e0904d0fdfc517759037e04923fed.zip |
Fix discharge order of comparisons in Lua parser.
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_parse.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lj_parse.c b/src/lj_parse.c index 92ebc046..7268d176 100644 --- a/src/lj_parse.c +++ b/src/lj_parse.c | |||
@@ -848,6 +848,7 @@ static void bcemit_comp(FuncState *fs, BinOpr opr, ExpDesc *e1, ExpDesc *e2) | |||
848 | if ((op-BC_ISLT) & 1) { /* GT -> LT, GE -> LE */ | 848 | if ((op-BC_ISLT) & 1) { /* GT -> LT, GE -> LE */ |
849 | e1 = e2; e2 = eret; /* Swap operands. */ | 849 | e1 = e2; e2 = eret; /* Swap operands. */ |
850 | op = ((op-BC_ISLT)^3)+BC_ISLT; | 850 | op = ((op-BC_ISLT)^3)+BC_ISLT; |
851 | expr_toval(fs, e1); | ||
851 | } | 852 | } |
852 | rd = expr_toanyreg(fs, e2); | 853 | rd = expr_toanyreg(fs, e2); |
853 | ra = expr_toanyreg(fs, e1); | 854 | ra = expr_toanyreg(fs, e1); |