Comments (7)
I added int64 types to luaish but the parser probably needs to be modified to autopromote large constants.
from usercorn.
https://github.com/lunixbochs/luaish/blob/20a5de713b1b8d18fa2c814d3323c50fd1dad506/compile.go#L941
https://github.com/lunixbochs/luaish/blob/20a5de713b1b8d18fa2c814d3323c50fd1dad506/utils.go#L147
from usercorn.
Oh! parseNumber just needs to try parsing unsigned as well to handle the > int64 <= uint64 range
from usercorn.
Fixed in lunixbochs/luaish@50b0cd6:
~/projects/luaish] ./glua
GopherLua 0.1 Copyright (C) 2015 Yusuke Inuzuka
> rax = 0.1
> print(rax)
0.1
> rax = 0xfffffffffffffff
> print(rax)
1152921504606846975
> rax = 0xffffffffffffffff
> print(rax)
-1
> rax = 0xfffffffffffffffff
> print(rax)
NaN
Run make get
to update the luaish dependency.
from usercorn.
Thanks for the quick turn around! The only slightly surprising behavior that I've noticed is writing a NaN number with u.reg_write
, but I think it might be unrelated.
0x0> x0
0
0x0> u.reg_write(arm64.x0, 0xfffffffffffffffff)
0x0> x0
0x8000000000000000
from usercorn.
from usercorn.
0x0> x0 = 1.5
could not restore x0: bad type: 1.5
0x0> u.reg_write(arm64.x0, 1.999999)
0x0> x0
1
0x0> u.reg_write(arm64.x0, -0.999999)
0x0> x0
0
0x0> u.reg_write(arm64.x0, -1.999999)
0x0> x0
0xffffffffffffffff
0x0> u.reg_write(arm64.x0, -5.999999)
0x0> x0
0xfffffffffffffffb
seems to more or less make sense how it handles floats
from usercorn.
Related Issues (20)
- dsymutil failed HOT 9
- Arm v7 emulation -> panic: Syscall missing: 18023 HOT 4
- add support for += in scripts
- request for `on exit`
- Custom filesystem HOT 4
- How to use usercorn with Lua HOT 1
- bpf: Add option for seccomp, and resolve meaning (e.g. syscall numbers)
- Regarding the python interface HOT 6
- Add instruction hooking
- Makefile issues HOT 4
- unstable: OS X build is broken HOT 2
- Display More Symbols in Trace HOT 20
- Unmap over several pages not correctly unmapping each page individually
- "dl_main: Assertion 'main_map != NULL' failed!" when executing mipsel binary HOT 14
- incorrect display of self-modifying code in streamui
- N/A
- FATAL: kernel too old HOT 1
- the keystone and capstone libs now land in deps/lib64 (ld: cannot find -lkeystone) HOT 1
- Please provide darwin AARCH64 support (iOS, macOS M1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from usercorn.