From 5544c5226b2a6a764faf1a3e7b755af7dc24e55c Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Sat, 28 Nov 2015 15:11:51 -0800 Subject: [PATCH] add a warning about integer precision in Lua --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 6b26786..5ec890b 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,23 @@ An assembler for the MIPS R4300i architecture, written in Lua. Not for production. Much of the code and syntax is untested and likely to change. Even this README is incomplete. +## Integer Precision + +**Please note:** some builds of Lua cannot precisely handle integers +larger than 24 bits. This can cause errorenous instructions to be assembled. +LuaJIT and Lua 5.3 shouldn't have this issue by default. + +Just to be safe, try running the following script: + +``` +local precise = 0x1000000 + 1 ~= 0x1000000 +if precise then + print("You're all set!") +else + print("You will have a bad time.") +end +``` + ## Syntax (TODO)