1c3b670ff19220959730d7886892bc4beb95d2ebaerik.corry@gmail.com// Copyright 2011 the V8 project authors. All rights reserved. 29a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// Redistribution and use in source and binary forms, with or without 39a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// modification, are permitted provided that the following conditions are 49a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// met: 59a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// 69a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// * Redistributions of source code must retain the above copyright 79a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// notice, this list of conditions and the following disclaimer. 89a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// * Redistributions in binary form must reproduce the above 99a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// copyright notice, this list of conditions and the following 109a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// disclaimer in the documentation and/or other materials provided 119a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// with the distribution. 129a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// * Neither the name of Google Inc. nor the names of its 139a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// contributors may be used to endorse or promote products derived 149a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// from this software without specific prior written permission. 159a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// 169a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 179a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 189a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 199a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 209a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 219a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 229a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 239a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 249a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 259a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 269a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 279a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 289a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com#include <stdlib.h> 299a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 30196eb601290dc49c3754da728dc58700dff2de1bmachenbach@chromium.org#include "src/v8.h" 319a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 32196eb601290dc49c3754da728dc58700dff2de1bmachenbach@chromium.org#include "src/debug.h" 33196eb601290dc49c3754da728dc58700dff2de1bmachenbach@chromium.org#include "src/disasm.h" 34196eb601290dc49c3754da728dc58700dff2de1bmachenbach@chromium.org#include "src/disassembler.h" 35a8702c210b949f35c64d8e4aa01bb6d525086c85machenbach@chromium.org#include "src/ic/ic.h" 36196eb601290dc49c3754da728dc58700dff2de1bmachenbach@chromium.org#include "src/macro-assembler.h" 37196eb601290dc49c3754da728dc58700dff2de1bmachenbach@chromium.org#include "src/serialize.h" 38196eb601290dc49c3754da728dc58700dff2de1bmachenbach@chromium.org#include "test/cctest/cctest.h" 399a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 409a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comusing namespace v8::internal; 419a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 429a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 439a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com#define __ assm. 449a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 459a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 469a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comstatic void DummyStaticFunction(Object* result) { 479a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com} 489a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 499a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 509a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comTEST(DisasmIa320) { 51e27d617298263725e8a48c2aa14029759b952623mstarzinger@chromium.org CcTest::InitializeVM(); 52bc176057ae476990672de915df235c9aeadc8521titzer@chromium.org Isolate* isolate = CcTest::i_isolate(); 532bda543d75374afd8d7e98f56ca99a57ae1b7bd1svenpanne@chromium.org HandleScope scope(isolate); 540c20e676f8a0209982ff89e5a9c707771748a585fschneider@chromium.org v8::internal::byte buffer[2048]; 552bda543d75374afd8d7e98f56ca99a57ae1b7bd1svenpanne@chromium.org Assembler assm(isolate, buffer, sizeof buffer); 569a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com DummyStaticFunction(NULL); // just bloody use it (DELETE; debugging) 579a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 589a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // Short immediate instructions 599a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ adc(eax, 12345678); 60c3b670ff19220959730d7886892bc4beb95d2ebaerik.corry@gmail.com __ add(eax, Immediate(12345678)); 619a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ or_(eax, 12345678); 62c3b670ff19220959730d7886892bc4beb95d2ebaerik.corry@gmail.com __ sub(eax, Immediate(12345678)); 639a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ xor_(eax, 12345678); 649a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ and_(eax, 12345678); 65d4be0f0c0edfc0a0b46e745055c3dc497c0ffcb5verwaest@chromium.org Handle<FixedArray> foo = isolate->factory()->NewFixedArray(10, TENURED); 669a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ cmp(eax, foo); 679a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 689a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // ---- This one caused crash 699a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ mov(ebx, Operand(esp, ecx, times_2, 0)); // [esp+ecx*4] 709a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 719a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // ---- All instructions that I can think of 72c3b670ff19220959730d7886892bc4beb95d2ebaerik.corry@gmail.com __ add(edx, ebx); 7359297c735ad2a41156ae9c723a39ff259ad061e0jkummerow@chromium.org __ add(edx, Operand(12, RelocInfo::NONE32)); 749a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ add(edx, Operand(ebx, 0)); 759a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ add(edx, Operand(ebx, 16)); 769a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ add(edx, Operand(ebx, 1999)); 77bc176057ae476990672de915df235c9aeadc8521titzer@chromium.org __ add(edx, Operand(ebx, -4)); 78bc176057ae476990672de915df235c9aeadc8521titzer@chromium.org __ add(edx, Operand(ebx, -1999)); 799a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ add(edx, Operand(esp, 0)); 809a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ add(edx, Operand(esp, 16)); 819a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ add(edx, Operand(esp, 1999)); 82bc176057ae476990672de915df235c9aeadc8521titzer@chromium.org __ add(edx, Operand(esp, -4)); 83bc176057ae476990672de915df235c9aeadc8521titzer@chromium.org __ add(edx, Operand(esp, -1999)); 84bc176057ae476990672de915df235c9aeadc8521titzer@chromium.org __ nop(); 85bc176057ae476990672de915df235c9aeadc8521titzer@chromium.org __ add(esi, Operand(ecx, times_4, 0)); 86bc176057ae476990672de915df235c9aeadc8521titzer@chromium.org __ add(esi, Operand(ecx, times_4, 24)); 87bc176057ae476990672de915df235c9aeadc8521titzer@chromium.org __ add(esi, Operand(ecx, times_4, -4)); 88bc176057ae476990672de915df235c9aeadc8521titzer@chromium.org __ add(esi, Operand(ecx, times_4, -1999)); 899a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 909a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ add(edi, Operand(ebp, ecx, times_4, 0)); 919a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ add(edi, Operand(ebp, ecx, times_4, 12)); 92bc176057ae476990672de915df235c9aeadc8521titzer@chromium.org __ add(edi, Operand(ebp, ecx, times_4, -8)); 93bc176057ae476990672de915df235c9aeadc8521titzer@chromium.org __ add(edi, Operand(ebp, ecx, times_4, -3999)); 949a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ add(Operand(ebp, ecx, times_4, 12), Immediate(12)); 959a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 969a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 97c3b670ff19220959730d7886892bc4beb95d2ebaerik.corry@gmail.com __ add(ebx, Immediate(12)); 989a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 999a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ adc(ecx, 12); 1009a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ adc(ecx, 1000); 1019a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 1029a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ and_(edx, 3); 1039a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ and_(edx, Operand(esp, 4)); 1049a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ cmp(edx, 3); 1059a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ cmp(edx, Operand(esp, 4)); 1069a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ cmp(Operand(ebp, ecx, times_4, 0), Immediate(1000)); 107d4be0f0c0edfc0a0b46e745055c3dc497c0ffcb5verwaest@chromium.org Handle<FixedArray> foo2 = isolate->factory()->NewFixedArray(10, TENURED); 1089a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ cmp(ebx, foo2); 109b302e56e5b70c4504faa2adf4ec3efb64a9d3e38sgjesse@chromium.org __ cmpb(ebx, Operand(ebp, ecx, times_2, 0)); 110b302e56e5b70c4504faa2adf4ec3efb64a9d3e38sgjesse@chromium.org __ cmpb(Operand(ebp, ecx, times_2, 0), ebx); 1119a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ or_(edx, 3); 1129a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ xor_(edx, 3); 1139a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 1141e8da746019f818a22dfdc6f691dbc0447048cadjkummerow@chromium.org __ cpuid(); 115c3b670ff19220959730d7886892bc4beb95d2ebaerik.corry@gmail.com __ movsx_b(edx, ecx); 116c3b670ff19220959730d7886892bc4beb95d2ebaerik.corry@gmail.com __ movsx_w(edx, ecx); 117c3b670ff19220959730d7886892bc4beb95d2ebaerik.corry@gmail.com __ movzx_b(edx, ecx); 118c3b670ff19220959730d7886892bc4beb95d2ebaerik.corry@gmail.com __ movzx_w(edx, ecx); 1199a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 1209a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 121c3b670ff19220959730d7886892bc4beb95d2ebaerik.corry@gmail.com __ imul(edx, ecx); 122c3b670ff19220959730d7886892bc4beb95d2ebaerik.corry@gmail.com __ shld(edx, ecx); 123c3b670ff19220959730d7886892bc4beb95d2ebaerik.corry@gmail.com __ shrd(edx, ecx); 124c3b670ff19220959730d7886892bc4beb95d2ebaerik.corry@gmail.com __ bts(edx, ecx); 1259a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ bts(Operand(ebx, ecx, times_4, 0), ecx); 1269a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 1279a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ pushad(); 1289a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ popad(); 1299a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ pushfd(); 1309a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ popfd(); 1319a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ push(Immediate(12)); 1329a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ push(Immediate(23456)); 1339a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ push(ecx); 1349a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ push(esi); 1359a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 1369a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ push(Operand(ebx, ecx, times_4, 0)); 1379a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ push(Operand(ebx, ecx, times_4, 0)); 1389a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ push(Operand(ebx, ecx, times_4, 10000)); 1399a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ pop(edx); 1409a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ pop(eax); 1419a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ pop(Operand(ebx, ecx, times_4, 0)); 1429a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 1439a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 1449a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ add(edx, Operand(esp, 16)); 145c3b670ff19220959730d7886892bc4beb95d2ebaerik.corry@gmail.com __ add(edx, ecx); 146c3b670ff19220959730d7886892bc4beb95d2ebaerik.corry@gmail.com __ mov_b(edx, ecx); 147c3b670ff19220959730d7886892bc4beb95d2ebaerik.corry@gmail.com __ mov_b(ecx, 6); 1489a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ mov_b(Operand(ebx, ecx, times_4, 10000), 6); 1499a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ mov_b(Operand(esp, 16), edx); 1509a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ mov_w(edx, Operand(esp, 16)); 1519a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ mov_w(Operand(esp, 16), edx); 1529a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 1539a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ movsx_w(edx, Operand(esp, 12)); 1549a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ movsx_b(edx, Operand(esp, 12)); 1559a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ movzx_w(edx, Operand(esp, 12)); 1569a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ movzx_b(edx, Operand(esp, 12)); 1579a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 1589a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ mov(edx, 1234567); 1599a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ mov(edx, Operand(esp, 12)); 1609a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ mov(Operand(ebx, ecx, times_4, 10000), Immediate(12345)); 1619a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ mov(Operand(ebx, ecx, times_4, 10000), edx); 1629a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 1639a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ dec_b(edx); 1644a1fe7d5e92fdb673d5f05d5ddf7b1ed703ba18dwhesse@chromium.org __ dec_b(Operand(eax, 10)); 1654a1fe7d5e92fdb673d5f05d5ddf7b1ed703ba18dwhesse@chromium.org __ dec_b(Operand(ebx, ecx, times_4, 10000)); 1669a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ dec(edx); 1679a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ cdq(); 1689a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 1699a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 1709a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ idiv(edx); 1717d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org __ idiv(Operand(edx, ecx, times_1, 1)); 1727d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org __ idiv(Operand(esp, 12)); 1737d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org __ div(edx); 1747d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org __ div(Operand(edx, ecx, times_1, 1)); 1757d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org __ div(Operand(esp, 12)); 1769a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ mul(edx); 1779a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ neg(edx); 1789a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ not_(edx); 1799a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ test(Operand(ebx, ecx, times_4, 10000), Immediate(123456)); 1809a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 1819a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ imul(edx, Operand(ebx, ecx, times_4, 10000)); 1829a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ imul(edx, ecx, 12); 1837d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org __ imul(edx, Operand(edx, eax, times_2, 42), 8); 1849a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ imul(edx, ecx, 1000); 1857d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org __ imul(edx, Operand(ebx, ecx, times_4, 1), 9000); 1869a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 1879a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ inc(edx); 1889a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ inc(Operand(ebx, ecx, times_4, 10000)); 1899a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ push(Operand(ebx, ecx, times_4, 10000)); 1909a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ pop(Operand(ebx, ecx, times_4, 10000)); 1919a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ call(Operand(ebx, ecx, times_4, 10000)); 1929a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ jmp(Operand(ebx, ecx, times_4, 10000)); 1939a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 1949a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ lea(edx, Operand(ebx, ecx, times_4, 10000)); 1959a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ or_(edx, 12345); 1969a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ or_(edx, Operand(ebx, ecx, times_4, 10000)); 1979a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 1989a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 1999a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2009a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ rcl(edx, 1); 2019a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ rcl(edx, 7); 202ea4f62e1df22417fc8dc2c2425485dca98b13d07ager@chromium.org __ rcr(edx, 1); 203ea4f62e1df22417fc8dc2c2425485dca98b13d07ager@chromium.org __ rcr(edx, 7); 2049a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ sar(edx, 1); 2059a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ sar(edx, 6); 206c4c927273ae2b690c4a015b4640a2a469c9a1a69ager@chromium.org __ sar_cl(edx); 2077d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org __ sar(Operand(ebx, ecx, times_4, 10000), 1); 2087d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org __ sar(Operand(ebx, ecx, times_4, 10000), 6); 2097d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org __ sar_cl(Operand(ebx, ecx, times_4, 10000)); 2109a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ sbb(edx, Operand(ebx, ecx, times_4, 10000)); 2119a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ shld(edx, Operand(ebx, ecx, times_4, 10000)); 2129a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ shl(edx, 1); 2139a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ shl(edx, 6); 214c4c927273ae2b690c4a015b4640a2a469c9a1a69ager@chromium.org __ shl_cl(edx); 2157d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org __ shl(Operand(ebx, ecx, times_4, 10000), 1); 2167d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org __ shl(Operand(ebx, ecx, times_4, 10000), 6); 2177d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org __ shl_cl(Operand(ebx, ecx, times_4, 10000)); 2189a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ shrd(edx, Operand(ebx, ecx, times_4, 10000)); 219c4c927273ae2b690c4a015b4640a2a469c9a1a69ager@chromium.org __ shr(edx, 1); 2209a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ shr(edx, 7); 221c4c927273ae2b690c4a015b4640a2a469c9a1a69ager@chromium.org __ shr_cl(edx); 2227d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org __ shr(Operand(ebx, ecx, times_4, 10000), 1); 2237d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org __ shr(Operand(ebx, ecx, times_4, 10000), 6); 2247d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org __ shr_cl(Operand(ebx, ecx, times_4, 10000)); 2259a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2269a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2279a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // Immediates 2289a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2299a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ adc(edx, 12345); 2309a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 231c3b670ff19220959730d7886892bc4beb95d2ebaerik.corry@gmail.com __ add(ebx, Immediate(12)); 2329a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ add(Operand(edx, ecx, times_4, 10000), Immediate(12)); 2339a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2349a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ and_(ebx, 12345); 2359a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2369a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ cmp(ebx, 12345); 237c3b670ff19220959730d7886892bc4beb95d2ebaerik.corry@gmail.com __ cmp(ebx, Immediate(12)); 2389a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ cmp(Operand(edx, ecx, times_4, 10000), Immediate(12)); 239c3b670ff19220959730d7886892bc4beb95d2ebaerik.corry@gmail.com __ cmpb(eax, 100); 2409a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2419a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ or_(ebx, 12345); 2429a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 243c3b670ff19220959730d7886892bc4beb95d2ebaerik.corry@gmail.com __ sub(ebx, Immediate(12)); 2449a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ sub(Operand(edx, ecx, times_4, 10000), Immediate(12)); 2459a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2469a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ xor_(ebx, 12345); 2479a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2489a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ imul(edx, ecx, 12); 2499a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ imul(edx, ecx, 1000); 2509a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 251ce5e87bd905d592a8bd612b3dedf7a994177c13aager@chromium.org __ cld(); 2520c20e676f8a0209982ff89e5a9c707771748a585fschneider@chromium.org __ rep_movs(); 253ce5e87bd905d592a8bd612b3dedf7a994177c13aager@chromium.org __ rep_stos(); 2549dfbea4c7d423c7bc1db94425cb78e7f7cf41f78erik.corry@gmail.com __ stos(); 2559a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2569a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ sub(edx, Operand(ebx, ecx, times_4, 10000)); 257c3b670ff19220959730d7886892bc4beb95d2ebaerik.corry@gmail.com __ sub(edx, ebx); 2589a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2599a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ test(edx, Immediate(12345)); 2609a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ test(edx, Operand(ebx, ecx, times_8, 10000)); 2612356e6fbe66ac3aa027b61cb43a3c3619b3c3a5evegorov@chromium.org __ test(Operand(esi, edi, times_1, -20000000), Immediate(300000000)); 2622356e6fbe66ac3aa027b61cb43a3c3619b3c3a5evegorov@chromium.org __ test_b(edx, Operand(ecx, ebx, times_2, 1000)); 2632356e6fbe66ac3aa027b61cb43a3c3619b3c3a5evegorov@chromium.org __ test_b(Operand(eax, -20), 0x9A); 2649a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 2659a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2669a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ xor_(edx, 12345); 2679a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ xor_(edx, Operand(ebx, ecx, times_8, 10000)); 2689a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ bts(Operand(ebx, ecx, times_8, 10000), edx); 2699a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ hlt(); 2709a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ int3(); 2719a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ ret(0); 2729a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ ret(8); 2739a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2749a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // Calls 2759a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2769a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com Label L1, L2; 2779a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ bind(&L1); 2789a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 2799a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ call(&L1); 2809a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ call(&L2); 2819a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 2829a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ bind(&L2); 2839a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ call(Operand(ebx, ecx, times_4, 10000)); 2849a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 2859cbaabda8b4daeb06759ace10c926ab55bb69d7bulan@chromium.org Handle<Code> ic(LoadIC::initialize_stub(isolate, NOT_CONTEXTUAL)); 286236ad9617a7359a463144a6ebeb5431a70f769cfager@chromium.org __ call(ic, RelocInfo::CODE_TARGET); 2879a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 288236ad9617a7359a463144a6ebeb5431a70f769cfager@chromium.org __ call(FUNCTION_ADDR(DummyStaticFunction), RelocInfo::RUNTIME_ENTRY); 2899a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 2909a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2919a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ jmp(&L1); 2929a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ jmp(Operand(ebx, ecx, times_4, 10000)); 2939a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com ExternalReference after_break_target = 294fb547e07aef43e02715c5d6c1530e84bb3cbba02machenbach@chromium.org ExternalReference::debug_after_break_target_address(isolate); 2959a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ jmp(Operand::StaticVariable(after_break_target)); 296236ad9617a7359a463144a6ebeb5431a70f769cfager@chromium.org __ jmp(ic, RelocInfo::CODE_TARGET); 2979a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 2989a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2999a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 3009a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com Label Ljcc; 3019a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 3029a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // long jumps 3039a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(overflow, &Ljcc); 3049a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(no_overflow, &Ljcc); 3059a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(below, &Ljcc); 3069a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(above_equal, &Ljcc); 3079a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(equal, &Ljcc); 3089a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(not_equal, &Ljcc); 3099a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(below_equal, &Ljcc); 3109a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(above, &Ljcc); 3119a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(sign, &Ljcc); 3129a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(not_sign, &Ljcc); 3139a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(parity_even, &Ljcc); 3149a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(parity_odd, &Ljcc); 3159a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(less, &Ljcc); 3169a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(greater_equal, &Ljcc); 3179a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(less_equal, &Ljcc); 3189a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(greater, &Ljcc); 3199a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 3209a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ bind(&Ljcc); 3219a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // short jumps 3229a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(overflow, &Ljcc); 3239a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(no_overflow, &Ljcc); 3249a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(below, &Ljcc); 3259a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(above_equal, &Ljcc); 3269a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(equal, &Ljcc); 3279a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(not_equal, &Ljcc); 3289a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(below_equal, &Ljcc); 3299a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(above, &Ljcc); 3309a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(sign, &Ljcc); 3319a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(not_sign, &Ljcc); 3329a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(parity_even, &Ljcc); 3339a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(parity_odd, &Ljcc); 3349a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(less, &Ljcc); 3359a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(greater_equal, &Ljcc); 3369a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(less_equal, &Ljcc); 3379a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ j(greater, &Ljcc); 3389a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 3399a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // 0xD9 instructions 3409a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 3419a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 3424a1fe7d5e92fdb673d5f05d5ddf7b1ed703ba18dwhesse@chromium.org __ fld(1); 3439a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fld1(); 3449a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fldz(); 3454a1fe7d5e92fdb673d5f05d5ddf7b1ed703ba18dwhesse@chromium.org __ fldpi(); 3469a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fabs(); 3479a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fchs(); 3489a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fprem(); 3499a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fprem1(); 3509a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fincstp(); 3519a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ ftst(); 3529a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fxch(3); 3539a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fld_s(Operand(ebx, ecx, times_4, 10000)); 3549a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fstp_s(Operand(ebx, ecx, times_4, 10000)); 3559a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ ffree(3); 3569a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fld_d(Operand(ebx, ecx, times_4, 10000)); 3579a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fstp_d(Operand(ebx, ecx, times_4, 10000)); 3589a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 3599a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 3609a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fild_s(Operand(ebx, ecx, times_4, 10000)); 3619a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fistp_s(Operand(ebx, ecx, times_4, 10000)); 3629a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fild_d(Operand(ebx, ecx, times_4, 10000)); 3639a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fistp_d(Operand(ebx, ecx, times_4, 10000)); 3649a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fnstsw_ax(); 3659a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 3669a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fadd(3); 3679a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fsub(3); 3689a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fmul(3); 3699a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fdiv(3); 3709a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 3719a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ faddp(3); 3729a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fsubp(3); 3739a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fmulp(3); 3749a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fdivp(3); 3759a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fcompp(); 3769a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ fwait(); 3776f1040e5c87d24f21c8afc2e08dc26cd1bfc5d1fmachenbach@chromium.org __ frndint(); 3786f1040e5c87d24f21c8afc2e08dc26cd1bfc5d1fmachenbach@chromium.org __ fninit(); 3799a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ nop(); 380af9cfcbed5daf6e636e189bce451c6fafdbb127dmachenbach@chromium.org 381af9cfcbed5daf6e636e189bce451c6fafdbb127dmachenbach@chromium.org // SSE instruction 382af9cfcbed5daf6e636e189bce451c6fafdbb127dmachenbach@chromium.org { 3833c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org // Move operation 3843c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ movaps(xmm0, xmm1); 3853c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ shufps(xmm0, xmm0, 0x0); 3863c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org 3873c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org // logic operation 3883c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ andps(xmm0, xmm1); 3893c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ andps(xmm0, Operand(ebx, ecx, times_4, 10000)); 3903c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ orps(xmm0, xmm1); 3913c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ orps(xmm0, Operand(ebx, ecx, times_4, 10000)); 3923c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ xorps(xmm0, xmm1); 3933c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ xorps(xmm0, Operand(ebx, ecx, times_4, 10000)); 3943c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org 3953c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org // Arithmetic operation 3963c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ addps(xmm1, xmm0); 3973c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ addps(xmm1, Operand(ebx, ecx, times_4, 10000)); 3983c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ subps(xmm1, xmm0); 3993c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ subps(xmm1, Operand(ebx, ecx, times_4, 10000)); 4003c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ mulps(xmm1, xmm0); 4013c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ mulps(xmm1, Operand(ebx, ecx, times_4, 10000)); 4023c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ divps(xmm1, xmm0); 4033c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ divps(xmm1, Operand(ebx, ecx, times_4, 10000)); 404af9cfcbed5daf6e636e189bce451c6fafdbb127dmachenbach@chromium.org } 4059a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com { 4063c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ cvttss2si(edx, Operand(ebx, ecx, times_4, 10000)); 4073c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ cvtsi2sd(xmm1, Operand(ebx, ecx, times_4, 10000)); 4083c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ movsd(xmm1, Operand(ebx, ecx, times_4, 10000)); 4093c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ movsd(Operand(ebx, ecx, times_4, 10000), xmm1); 4103c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org // 128 bit move instructions. 4113c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ movdqa(xmm0, Operand(ebx, ecx, times_4, 10000)); 4123c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ movdqa(Operand(ebx, ecx, times_4, 10000), xmm0); 4133c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ movdqu(xmm0, Operand(ebx, ecx, times_4, 10000)); 4143c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ movdqu(Operand(ebx, ecx, times_4, 10000), xmm0); 4153c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org 4163c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ addsd(xmm1, xmm0); 4173c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ mulsd(xmm1, xmm0); 4183c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ subsd(xmm1, xmm0); 419a2c0c1516848536a514b3178d2c040b7df0ceb5bmachenbach@chromium.org __ subsd(xmm1, Operand(ebx, ecx, times_4, 10000)); 4203c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ divsd(xmm1, xmm0); 4213c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ ucomisd(xmm0, xmm1); 4223c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ cmpltsd(xmm0, xmm1); 4233c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org 4243c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ andpd(xmm0, xmm1); 4253c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ psllq(xmm0, 17); 4263c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ psllq(xmm0, xmm1); 4273c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ psrlq(xmm0, 17); 4283c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ psrlq(xmm0, xmm1); 4293c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org __ por(xmm0, xmm1); 4309a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com } 4319d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com 4329d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com // cmov. 4339d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com { 4341e4822ffed805d9cbb2a47cc9453aef06f3dfacamachenbach@chromium.org __ cmov(overflow, eax, Operand(eax, 0)); 4351e4822ffed805d9cbb2a47cc9453aef06f3dfacamachenbach@chromium.org __ cmov(no_overflow, eax, Operand(eax, 1)); 4361e4822ffed805d9cbb2a47cc9453aef06f3dfacamachenbach@chromium.org __ cmov(below, eax, Operand(eax, 2)); 4371e4822ffed805d9cbb2a47cc9453aef06f3dfacamachenbach@chromium.org __ cmov(above_equal, eax, Operand(eax, 3)); 4381e4822ffed805d9cbb2a47cc9453aef06f3dfacamachenbach@chromium.org __ cmov(equal, eax, Operand(ebx, 0)); 4391e4822ffed805d9cbb2a47cc9453aef06f3dfacamachenbach@chromium.org __ cmov(not_equal, eax, Operand(ebx, 1)); 4401e4822ffed805d9cbb2a47cc9453aef06f3dfacamachenbach@chromium.org __ cmov(below_equal, eax, Operand(ebx, 2)); 4411e4822ffed805d9cbb2a47cc9453aef06f3dfacamachenbach@chromium.org __ cmov(above, eax, Operand(ebx, 3)); 4421e4822ffed805d9cbb2a47cc9453aef06f3dfacamachenbach@chromium.org __ cmov(sign, eax, Operand(ecx, 0)); 4431e4822ffed805d9cbb2a47cc9453aef06f3dfacamachenbach@chromium.org __ cmov(not_sign, eax, Operand(ecx, 1)); 4441e4822ffed805d9cbb2a47cc9453aef06f3dfacamachenbach@chromium.org __ cmov(parity_even, eax, Operand(ecx, 2)); 4451e4822ffed805d9cbb2a47cc9453aef06f3dfacamachenbach@chromium.org __ cmov(parity_odd, eax, Operand(ecx, 3)); 4461e4822ffed805d9cbb2a47cc9453aef06f3dfacamachenbach@chromium.org __ cmov(less, eax, Operand(edx, 0)); 4471e4822ffed805d9cbb2a47cc9453aef06f3dfacamachenbach@chromium.org __ cmov(greater_equal, eax, Operand(edx, 1)); 4481e4822ffed805d9cbb2a47cc9453aef06f3dfacamachenbach@chromium.org __ cmov(less_equal, eax, Operand(edx, 2)); 4491e4822ffed805d9cbb2a47cc9453aef06f3dfacamachenbach@chromium.org __ cmov(greater, eax, Operand(edx, 3)); 4509d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com } 4519d58c2b1c27d8b2890b9bd46e57d3842b09e0292christian.plesner.hansen@gmail.com 452d91075f76b836c2cfa4f4e4cc0fb31170df864ccerik.corry@gmail.com { 4533c3c8d733702cb2b41471efa5eead1faf5b5711bmachenbach@chromium.org if (CpuFeatures::IsSupported(SSE4_1)) { 454750145ab1b720c97adf2b548cc8fbd28c8b8e06dulan@chromium.org CpuFeatureScope scope(&assm, SSE4_1); 455c3b670ff19220959730d7886892bc4beb95d2ebaerik.corry@gmail.com __ pextrd(eax, xmm0, 1); 456c3b670ff19220959730d7886892bc4beb95d2ebaerik.corry@gmail.com __ pinsrd(xmm1, eax, 0); 457b4968bea48ba224f54110f626278e2c04649dd5bmstarzinger@chromium.org __ extractps(eax, xmm1, 0); 458d91075f76b836c2cfa4f4e4cc0fb31170df864ccerik.corry@gmail.com } 459d91075f76b836c2cfa4f4e4cc0fb31170df864ccerik.corry@gmail.com } 460d91075f76b836c2cfa4f4e4cc0fb31170df864ccerik.corry@gmail.com 4617d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org // xchg. 4627d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org { 4637d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org __ xchg(eax, eax); 4647d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org __ xchg(eax, ebx); 4657d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org __ xchg(ebx, ebx); 4667d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org __ xchg(ebx, Operand(esp, 12)); 4677d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org } 4687d299ad4dc0ca26e0017b190b48362ad71328ce4machenbach@chromium.org 46964e3a4be4a99f31920128de34573c8ac9038de42ricow@chromium.org // Nop instructions 47064e3a4be4a99f31920128de34573c8ac9038de42ricow@chromium.org for (int i = 0; i < 16; i++) { 47164e3a4be4a99f31920128de34573c8ac9038de42ricow@chromium.org __ Nop(i); 47264e3a4be4a99f31920128de34573c8ac9038de42ricow@chromium.org } 47364e3a4be4a99f31920128de34573c8ac9038de42ricow@chromium.org 4749a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com __ ret(0); 4759a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 4769a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com CodeDesc desc; 4779a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com assm.GetCode(&desc); 4789fa619507474a4c1c21c6935b3209070bc13a218machenbach@chromium.org Handle<Code> code = isolate->factory()->NewCode( 4799fa619507474a4c1c21c6935b3209070bc13a218machenbach@chromium.org desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); 4809fa619507474a4c1c21c6935b3209070bc13a218machenbach@chromium.org USE(code); 4819e3e0b618a14a05efd7d66f20bac4423dd3a1a2ffschneider@chromium.org#ifdef OBJECT_PRINT 482f15d0cdbef11a212e108432465f014a7d3c3aa12machenbach@chromium.org OFStream os(stdout); 483f15d0cdbef11a212e108432465f014a7d3c3aa12machenbach@chromium.org code->Print(os); 4849fa619507474a4c1c21c6935b3209070bc13a218machenbach@chromium.org byte* begin = code->instruction_start(); 4859fa619507474a4c1c21c6935b3209070bc13a218machenbach@chromium.org byte* end = begin + code->instruction_size(); 4869a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com disasm::Disassembler::Disassemble(stdout, begin, end); 4879a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com#endif 4889a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com} 4899a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 4909a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com#undef __ 491