Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DynASM 1.4 upgrade/merge #649

Merged
merged 1 commit into from
Oct 31, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/dasm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if arch == 'x64' then arch = 'x86' end --same linker for x64
local C = ffi.C
local M = {C = C}

M._VERSION = 10300
M._VERSION = 10400

ffi.cdef[[
enum {
Expand Down
1 change: 0 additions & 1 deletion src/dasm_mm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,3 @@ if not ... then
end

return {new = new, free = free, protect = protect}

6 changes: 3 additions & 3 deletions src/dasm_proto.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
** DynASM encoding engine prototypes.
** Copyright (C) 2005-2014 Mike Pall. All rights reserved.
** Copyright (C) 2005-2015 Mike Pall. All rights reserved.
** Released under the MIT license. See dynasm.lua for full copyright notice.
*/

Expand All @@ -10,8 +10,8 @@
#include <stddef.h>
#include <stdarg.h>

#define DASM_IDENT "DynASM 1.3.0"
#define DASM_VERSION 10300 /* 1.3.0 */
#define DASM_IDENT "DynASM 1.4.0"
#define DASM_VERSION 10400 /* 1.4.0 */

#ifndef Dst_DECL
#define Dst_DECL dasm_State **Dst
Expand Down
2 changes: 1 addition & 1 deletion src/dasm_x64.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
------------------------------------------------------------------------------
-- DynASM x64 module.
--
-- Copyright (C) 2005-2014 Mike Pall. All rights reserved.
-- Copyright (C) 2005-2015 Mike Pall. All rights reserved.
-- See dynasm.lua for full copyright notice.
------------------------------------------------------------------------------
-- This module just sets 64 bit mode for the combined x86/x64 module.
Expand Down
9 changes: 7 additions & 2 deletions src/dasm_x86.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
** DynASM x86 encoding engine.
** Copyright (C) 2005-2014 Mike Pall. All rights reserved.
** Copyright (C) 2005-2015 Mike Pall. All rights reserved.
** Released under the MIT license. See dynasm.lua for full copyright notice.
*/

Expand Down Expand Up @@ -391,7 +391,12 @@ int dasm_encode(Dst_DECL, void *buffer)
case DASM_IMM_D: wd: dasmd(n); break;
case DASM_IMM_WB: if (((n+128)&-256) == 0) goto db; else mark = NULL;
case DASM_IMM_W: dasmw(n); break;
case DASM_VREG: { int t = *p++; if (t >= 2) n<<=3; cp[-1] |= n; break; }
case DASM_VREG: {
int t = *p++;
if (t >= 5) n <<= 4; else if (t >= 2) n <<= 3;
cp[-1] ^= n;
break;
}
case DASM_REL_LG: p++; if (n >= 0) goto rel_pc;
b++; n = (int)(ptrdiff_t)D->globals[-n];
case DASM_REL_A: rel_a: n -= (int)(ptrdiff_t)(cp+4); goto wd; /* !x64 */
Expand Down
Loading