diff options
author | James R. McKaskill <james@foobar.co.nz> | 2012-04-07 12:16:18 +0400 |
---|---|---|
committer | James R. McKaskill <james@foobar.co.nz> | 2012-04-07 12:16:18 +0400 |
commit | 1be971ff948b501503f44d9e4de0ae71ade67124 (patch) | |
tree | 390829a79f46548ae19a2e93a979108e0d594bd9 /call_x86.dasc | |
parent | 0bbb217b5dfed7bc407be4f4ddd126c657515ad1 (diff) |
Add support for _Bool and fixup bool tests
Diffstat (limited to 'call_x86.dasc')
-rw-r--r-- | call_x86.dasc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/call_x86.dasc b/call_x86.dasc index 5854767..82e27a8 100644 --- a/call_x86.dasc +++ b/call_x86.dasc @@ -1013,6 +1013,15 @@ void compile_function(lua_State* L, cfunction func, int ct_usr, const struct cty lua_pop(L, 1); break; + case BOOL_TYPE: + | call_rr extern to_int32, L_ARG, i + | cmp eax, 0 + | setne al + | movzx eax, al + add_int(Dst, ct, ®, 0); + lua_pop(L, 1); + break; + case INT32_TYPE: | call_rr extern to_int32, L_ARG, i add_int(Dst, ct, ®, 0); |