140 // MIPS has no call instruction with imm32/imm64. Usually, a call was done like this: |
140 // MIPS has no call instruction with imm32/imm64. Usually, a call was done like this: |
141 // 32 bits: |
141 // 32 bits: |
142 // lui rt, imm16 |
142 // lui rt, imm16 |
143 // addiu rt, rt, imm16 |
143 // addiu rt, rt, imm16 |
144 // jalr rt |
144 // jalr rt |
145 // nop |
145 // nop |
146 // |
146 // |
147 // 64 bits: |
147 // 64 bits: |
148 // lui rd, imm(63...48); |
148 // lui rd, imm(63...48); |
149 // ori rd, rd, imm(47...32); |
149 // ori rd, rd, imm(47...32); |
150 // dsll rd, rd, 16; |
150 // dsll rd, rd, 16; |
151 // ori rd, rd, imm(31...16); |
151 // ori rd, rd, imm(31...16); |
152 // dsll rd, rd, 16; |
152 // dsll rd, rd, 16; |
153 // ori rd, rd, imm(15...0); |
153 // ori rd, rd, imm(15...0); |
154 // jalr rd |
154 // jalr rd |
155 // nop |
155 // nop |
156 // |
156 // |
157 |
157 |
158 // we just consider the above for instruction as one call instruction |
158 // we just consider the above for instruction as one call instruction |
159 class NativeCall: public NativeInstruction { |
159 class NativeCall: public NativeInstruction { |
160 public: |
160 public: |