Home | History | Annotate | Download | only in traceline
      1 ; Copyright (c) 2009 The Chromium Authors. All rights reserved.
      2 ; Use of this source code is governed by a BSD-style license that can be
      3 ; found in the LICENSE file.
      4 
      5 ; This file is just a convenient place for experimenting with x86 encodings.
      6 
      7 BITS 32
      8 
      9 ; sldt to detect which processor we are running on.
     10 sldt eax
     11 sidt [esp]
     12 sidt [esp+2]
     13 
     14 lea eax, [fs:0]
     15 
     16 mov eax, [fs:0x18]
     17 
     18 mov ebx, 0x1234567
     19 mov eax, 0x1234567
     20 
     21 rdtsc
     22 
     23 push eax
     24 pop eax
     25 
     26 mov eax, [ecx]
     27 mov eax, [esp+4]
     28 mov ebx, [esp+4]
     29 
     30 lock xadd [eax], eax
     31 lock xadd [ecx], ecx
     32 lock xadd [ecx], eax
     33 
     34 jmp eax
     35 jmp edx
     36 
     37 lodsd
     38 
     39 rep stosb
     40 
     41 rep movsb
     42 
     43 mov eax, ebx
     44 mov edx, edx
     45 
     46 mov eax, eax
     47 
     48 stosd
     49 
     50 add eax, eax
     51 add edi, ecx
     52 
     53 and eax, 0x0000ffff
     54 and ecx, 0x0000ffff
     55 and edx, 0x0000ffff
     56 
     57 add edi, 0x12345
     58 add eax, 0x12345
     59 add ecx, 0x12345
     60 
     61 push 0x12
     62 push BYTE 0x12
     63 
     64 mov eax, [ebp+8]
     65 
     66 mov eax, 0x1234
     67 mov [fs:0], eax
     68 
     69 call 0x1234
     70 
     71 call eax
     72 call ecx
     73 
     74 add ebx, BYTE 3
     75 or ecx, 0xffff
     76 or eax, 0xffff
     77 
     78 mov eax, [esp+24]
     79 
     80 movsd
     81 movsb
     82 
     83 jmp blah
     84 blah:
     85 jmp blah
     86 
     87 cmp eax, 0x1234567
     88 cmp ecx, 0x1234567
     89 je NEAR blah2
     90 jo NEAR blah2
     91 blah2:
     92 
     93 add esp, 12
     94 add esp, BYTE 12
     95 sub esp, BYTE 12
     96 
     97 cmp eax, 12
     98 cmp ecx, BYTE 12
     99 
    100 cmp WORD [esp+6], 0x6666
    101 
    102 push DWORD [edi-4]
    103 push DWORD [edi-8]
    104 push DWORD [edi-12]
    105 push DWORD [edi-16]
    106 push DWORD [edi-20]
    107 
    108 x:
    109 loop x
    110 
    111 mov edx, [fs:0x4]
    112 
    113 cmp ecx, ecx
    114 cmp ecx, ebx
    115 cmp ebx, ebx
    116 
    117 mov eax,[dword fs:0x24]
    118 mov eax,[fs:0x24]
    119 
    120 mov ecx,[dword fs:0x24]
    121 mov ecx,[fs:0x24]
    122 
    123 mov eax, [ebx+12]
    124 mov ebx, [ebx+12]
    125 
    126 cmovo eax, eax
    127 
    128 mov eax, eax
    129 
    130 xchg eax, ebx
    131 xchg ebx, ecx
    132 xchg ebx, [esp+4]
    133