| OLD | NEW | 
|    1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |    1 // Copyright 2006-2008 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  132   __ imul(eax, Operand(edx)); |  132   __ imul(eax, Operand(edx)); | 
|  133   __ sub(Operand(edx), Immediate(1)); |  133   __ sub(Operand(edx), Immediate(1)); | 
|  134  |  134  | 
|  135   __ bind(&C); |  135   __ bind(&C); | 
|  136   __ test(edx, Operand(edx)); |  136   __ test(edx, Operand(edx)); | 
|  137   __ j(not_zero, &L, taken); |  137   __ j(not_zero, &L, taken); | 
|  138   __ ret(0); |  138   __ ret(0); | 
|  139  |  139  | 
|  140   // some relocated stuff here, not executed |  140   // some relocated stuff here, not executed | 
|  141   __ mov(eax, Factory::true_value()); |  141   __ mov(eax, Factory::true_value()); | 
|  142   __ jmp(NULL, runtime_entry); |  142   __ jmp(NULL, RelocInfo::RUNTIME_ENTRY); | 
|  143  |  143  | 
|  144   CodeDesc desc; |  144   CodeDesc desc; | 
|  145   assm.GetCode(&desc); |  145   assm.GetCode(&desc); | 
|  146   Object* code = Heap::CreateCode(desc, NULL, Code::ComputeFlags(Code::STUB)); |  146   Object* code = Heap::CreateCode(desc, NULL, Code::ComputeFlags(Code::STUB)); | 
|  147   CHECK(code->IsCode()); |  147   CHECK(code->IsCode()); | 
|  148 #ifdef DEBUG |  148 #ifdef DEBUG | 
|  149   Code::cast(code)->Print(); |  149   Code::cast(code)->Print(); | 
|  150 #endif |  150 #endif | 
|  151   F1 f = FUNCTION_CAST<F1>(Code::cast(code)->entry()); |  151   F1 f = FUNCTION_CAST<F1>(Code::cast(code)->entry()); | 
|  152   int res = f(10); |  152   int res = f(10); | 
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  221  |  221  | 
|  222  |  222  | 
|  223 static int baz = 42; |  223 static int baz = 42; | 
|  224 TEST(AssemblerIa325) { |  224 TEST(AssemblerIa325) { | 
|  225   InitializeVM(); |  225   InitializeVM(); | 
|  226   v8::HandleScope scope; |  226   v8::HandleScope scope; | 
|  227  |  227  | 
|  228   v8::internal::byte buffer[256]; |  228   v8::internal::byte buffer[256]; | 
|  229   Assembler assm(buffer, sizeof buffer); |  229   Assembler assm(buffer, sizeof buffer); | 
|  230  |  230  | 
|  231   __ mov(eax, Operand(reinterpret_cast<intptr_t>(&baz), no_reloc)); |  231   __ mov(eax, Operand(reinterpret_cast<intptr_t>(&baz), RelocInfo::NONE)); | 
|  232   __ ret(0); |  232   __ ret(0); | 
|  233  |  233  | 
|  234   CodeDesc desc; |  234   CodeDesc desc; | 
|  235   assm.GetCode(&desc); |  235   assm.GetCode(&desc); | 
|  236   Code* code = |  236   Code* code = | 
|  237       Code::cast(Heap::CreateCode(desc, NULL, Code::ComputeFlags(Code::STUB))); |  237       Code::cast(Heap::CreateCode(desc, NULL, Code::ComputeFlags(Code::STUB))); | 
|  238   F0 f = FUNCTION_CAST<F0>(code->entry()); |  238   F0 f = FUNCTION_CAST<F0>(code->entry()); | 
|  239   int res = f(); |  239   int res = f(); | 
|  240   CHECK_EQ(42, res); |  240   CHECK_EQ(42, res); | 
|  241 } |  241 } | 
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  367 #endif |  367 #endif | 
|  368  |  368  | 
|  369   F7 f = FUNCTION_CAST<F7>(Code::cast(code)->entry()); |  369   F7 f = FUNCTION_CAST<F7>(Code::cast(code)->entry()); | 
|  370   CHECK_EQ(kLess, f(1.1, 2.2)); |  370   CHECK_EQ(kLess, f(1.1, 2.2)); | 
|  371   CHECK_EQ(kEqual, f(2.2, 2.2)); |  371   CHECK_EQ(kEqual, f(2.2, 2.2)); | 
|  372   CHECK_EQ(kGreater, f(3.3, 2.2)); |  372   CHECK_EQ(kGreater, f(3.3, 2.2)); | 
|  373   CHECK_EQ(kNaN, f(OS::nan_value(), 1.1)); |  373   CHECK_EQ(kNaN, f(OS::nan_value(), 1.1)); | 
|  374 } |  374 } | 
|  375  |  375  | 
|  376 #undef __ |  376 #undef __ | 
| OLD | NEW |