mernen (owner)

Revisions

gist: 138362 Download_button fork
public
Public Clone URL: git://gist.github.com/138362.git
Diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
diff --git i/vm/llvm/jit_operations.hpp w/vm/llvm/jit_operations.hpp
index f55a771..aa15021 100644
--- i/vm/llvm/jit_operations.hpp
+++ w/vm/llvm/jit_operations.hpp
@@ -293,7 +293,7 @@ namespace rubinius {
     Value* ptrtoint(Value* ptr) {
       return CastInst::Create(
           Instruction::PtrToInt,
- ptr, Type::Int32Ty, "ptr2int", block_);
+ ptr, IntPtrTy, "ptr2int", block_);
     }
 
     Value* subtract_pointers(Value* ptra, Value* ptrb) {
@@ -302,7 +302,7 @@ namespace rubinius {
 
       Value* sub = BinaryOperator::CreateSub(inta, intb, "ptr_diff", block_);
 
- Value* size_of = ConstantInt::get(Type::Int32Ty, 4);
+ Value* size_of = ConstantInt::get(IntPtrTy, sizeof(uintptr_t));
 
       return BinaryOperator::CreateSDiv(sub, size_of, "ptr_diff_adj", block_);
     }
diff --git i/vm/llvm/jit_util.cpp w/vm/llvm/jit_util.cpp
index 570d441..c0c2383 100644
--- i/vm/llvm/jit_util.cpp
+++ w/vm/llvm/jit_util.cpp
@@ -645,7 +645,7 @@ extern "C" {
     self->set_table_ivar(state, name, val);
   }
 
- Object* rbx_continue_uncommon(STATE, CallFrame* call_frame, Arguments& args, int sp) {
+ Object* rbx_continue_uncommon(STATE, CallFrame* call_frame, Arguments& args, native_int sp) {
     LLVMState::get(state)->add_uncommons_taken();
 
     VMMethod* vmm = call_frame->cm->backend_method_;
diff --git i/vm/llvm/jit_visit.hpp w/vm/llvm/jit_visit.hpp
index 6cc69a7..7b33eef 100644
--- i/vm/llvm/jit_visit.hpp
+++ w/vm/llvm/jit_visit.hpp
@@ -1016,7 +1016,7 @@ namespace rubinius {
       sig << "VM";
       sig << "CallFrame";
       sig << "Arguments";
- sig << Type::Int32Ty;
+ sig << IntPtrTy;
 
       Value* cur = stack_ptr();
 
diff --git i/vm/template/instructions.cpp w/vm/template/instructions.cpp
index 6e6cdb2..4fafd15 100644
--- i/vm/template/instructions.cpp
+++ w/vm/template/instructions.cpp
@@ -236,7 +236,7 @@ exception:
 }
 
 Object* VMMethod::uncommon_interpreter(STATE, VMMethod* const vmm,
- CallFrame* const call_frame, Arguments& args, int sp)
+ CallFrame* const call_frame, Arguments& args, native_int sp)
 {
 #ruby <<CODE
   impl2 = si.decode_methods
diff --git i/vm/vmmethod.hpp w/vm/vmmethod.hpp
index 83200ec..65c2dff 100644
--- i/vm/vmmethod.hpp
+++ w/vm/vmmethod.hpp
@@ -153,7 +153,7 @@ namespace rubinius {
                                         Arguments& args);
 
     static Object* uncommon_interpreter(STATE, VMMethod* const vmm,
- CallFrame* const call_frame, Arguments& args, int sp);
+ CallFrame* const call_frame, Arguments& args, native_int sp);
 
     void setup_argument_handler(CompiledMethod* meth);