aboutsummaryrefslogtreecommitdiff
path: root/dynasm
diff options
context:
space:
mode:
Diffstat (limited to 'dynasm')
-rw-r--r--dynasm/dasm_x86.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/dynasm/dasm_x86.lua b/dynasm/dasm_x86.lua
index d985e3ff..26a52bbd 100644
--- a/dynasm/dasm_x86.lua
+++ b/dynasm/dasm_x86.lua
@@ -173,7 +173,7 @@ end
173-- Global label name -> global label number. With auto assignment on 1st use. 173-- Global label name -> global label number. With auto assignment on 1st use.
174local next_global = 10 174local next_global = 10
175local map_global = setmetatable({}, { __index = function(t, name) 175local map_global = setmetatable({}, { __index = function(t, name)
176 if not match(name, "^[%a_][%w_]*$") then werror("bad global label") end 176 if not match(name, "^[%a_][%w_@]*$") then werror("bad global label") end
177 local n = next_global 177 local n = next_global
178 if n > 246 then werror("too many global labels") end 178 if n > 246 then werror("too many global labels") end
179 next_global = n + 1 179 next_global = n + 1
@@ -198,7 +198,7 @@ local function writeglobals(out, prefix)
198 for name, n in pairs(map_global) do t[n] = name end 198 for name, n in pairs(map_global) do t[n] = name end
199 out:write("enum {\n") 199 out:write("enum {\n")
200 for i=10,next_global-1 do 200 for i=10,next_global-1 do
201 out:write(" ", prefix, t[i], ",\n") 201 out:write(" ", prefix, gsub(t[i], "@.*", ""), ",\n")
202 end 202 end
203 out:write(" ", prefix, "_MAX\n};\n") 203 out:write(" ", prefix, "_MAX\n};\n")
204end 204end