| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 | 234 |
| 235 | 235 |
| 236 static int baz = 42; | 236 static int baz = 42; |
| 237 TEST(AssemblerIa325) { | 237 TEST(AssemblerIa325) { |
| 238 InitializeVM(); | 238 InitializeVM(); |
| 239 v8::HandleScope scope; | 239 v8::HandleScope scope; |
| 240 | 240 |
| 241 v8::internal::byte buffer[256]; | 241 v8::internal::byte buffer[256]; |
| 242 Assembler assm(Isolate::Current(), buffer, sizeof buffer); | 242 Assembler assm(Isolate::Current(), buffer, sizeof buffer); |
| 243 | 243 |
| 244 __ mov(eax, Operand(reinterpret_cast<intptr_t>(&baz), RelocInfo::NONE)); | 244 __ mov(eax, Operand(reinterpret_cast<intptr_t>(&baz), RelocInfo::NONE32)); |
| 245 __ ret(0); | 245 __ ret(0); |
| 246 | 246 |
| 247 CodeDesc desc; | 247 CodeDesc desc; |
| 248 assm.GetCode(&desc); | 248 assm.GetCode(&desc); |
| 249 Code* code = Code::cast(HEAP->CreateCode( | 249 Code* code = Code::cast(HEAP->CreateCode( |
| 250 desc, | 250 desc, |
| 251 Code::ComputeFlags(Code::STUB), | 251 Code::ComputeFlags(Code::STUB), |
| 252 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked()); | 252 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked()); |
| 253 F0 f = FUNCTION_CAST<F0>(code->entry()); | 253 F0 f = FUNCTION_CAST<F0>(code->entry()); |
| 254 int res = f(); | 254 int res = f(); |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 | 470 |
| 471 F0 f = FUNCTION_CAST<F0>(code->entry()); | 471 F0 f = FUNCTION_CAST<F0>(code->entry()); |
| 472 int res = f(); | 472 int res = f(); |
| 473 CHECK_EQ(42, res); | 473 CHECK_EQ(42, res); |
| 474 } | 474 } |
| 475 | 475 |
| 476 | 476 |
| 477 | 477 |
| 478 | 478 |
| 479 #undef __ | 479 #undef __ |
| OLD | NEW |