diff --git a/tool/ruby_vm/models/bare_instructions.rb b/tool/ruby_vm/models/bare_instructions.rb old mode 100644 new mode 100755 index 2d6db2849e..7e573240b5 --- a/tool/ruby_vm/models/bare_instructions.rb +++ b/tool/ruby_vm/models/bare_instructions.rb @@ -128,7 +128,7 @@ class RubyVM::BareInstructions generate_attribute 'rb_num_t', 'popn', pops.size generate_attribute 'rb_num_t', 'retn', rets.size generate_attribute 'rb_num_t', 'width', width - generate_attribute 'rb_num_t', 'sp_inc', rets.size - pops.size + generate_attribute 'rb_snum_t', 'sp_inc', rets.size - pops.size generate_attribute 'bool', 'handles_frame', false end diff --git a/vm_insnhelper.h b/vm_insnhelper.h index 01ea7a2a3e..1d54c0b9a1 100644 --- a/vm_insnhelper.h +++ b/vm_insnhelper.h @@ -101,22 +101,7 @@ enum vm_regan_acttype { #define DEC_SP(x) (VM_REG_SP -= (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x)))) #define SET_SV(x) (*GET_SP() = (x)) /* set current stack value as x */ -#ifdef _MSC_VER -/* Workaround needed for adding negative number to a pointer */ -#define ADJ_SP(x) do { \ - rb_snum_t adj = (x); \ - if (adj >= 0) { \ - INC_SP(adj); \ - } \ - else { \ - SIGNED_VALUE dec = -1; \ - dec *= adj; \ - DEC_SP(dec); \ - } \ -} while (0) -#else #define ADJ_SP(x) INC_SP(x) -#endif /* instruction sequence C struct */ #define GET_ISEQ() (GET_CFP()->iseq)