| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 m_assembler.movq_rm(src, address.offset, address.base); | 237 m_assembler.movq_rm(src, address.offset, address.base); |
| 238 } | 238 } |
| 239 | 239 |
| 240 void storePtr(RegisterID src, BaseIndex address) | 240 void storePtr(RegisterID src, BaseIndex address) |
| 241 { | 241 { |
| 242 m_assembler.movq_rm(src, address.offset, address.base, address.index, ad
dress.scale); | 242 m_assembler.movq_rm(src, address.offset, address.base, address.index, ad
dress.scale); |
| 243 } | 243 } |
| 244 | 244 |
| 245 void storePtr(ImmPtr imm, ImplicitAddress address) | 245 void storePtr(ImmPtr imm, ImplicitAddress address) |
| 246 { | 246 { |
| 247 move(imm, scratchRegister); | 247 intptr_t ptr = imm.asIntptr(); |
| 248 storePtr(scratchRegister, address); | 248 if (CAN_SIGN_EXTEND_32_64(ptr)) |
| 249 m_assembler.movq_i32m(static_cast<int>(ptr), address.offset, address
.base); |
| 250 else { |
| 251 move(imm, scratchRegister); |
| 252 storePtr(scratchRegister, address); |
| 253 } |
| 249 } | 254 } |
| 250 | 255 |
| 251 DataLabel32 storePtrWithAddressOffsetPatch(RegisterID src, Address address) | 256 DataLabel32 storePtrWithAddressOffsetPatch(RegisterID src, Address address) |
| 252 { | 257 { |
| 253 m_assembler.movq_rm_disp32(src, address.offset, address.base); | 258 m_assembler.movq_rm_disp32(src, address.offset, address.base); |
| 254 return DataLabel32(this); | 259 return DataLabel32(this); |
| 255 } | 260 } |
| 256 | 261 |
| 257 void setPtr(Condition cond, RegisterID left, Imm32 right, RegisterID dest) | 262 void setPtr(Condition cond, RegisterID left, Imm32 right, RegisterID dest) |
| 258 { | 263 { |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 storePtr(scratchRegister, address); | 389 storePtr(scratchRegister, address); |
| 385 return label; | 390 return label; |
| 386 } | 391 } |
| 387 }; | 392 }; |
| 388 | 393 |
| 389 } // namespace JSC | 394 } // namespace JSC |
| 390 | 395 |
| 391 #endif // ENABLE(ASSEMBLER) | 396 #endif // ENABLE(ASSEMBLER) |
| 392 | 397 |
| 393 #endif // MacroAssemblerX86_64_h | 398 #endif // MacroAssemblerX86_64_h |
| OLD | NEW |