Skip to content

Instantly share code, notes, and snippets.

@gerdr
Created September 26, 2011 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gerdr/1243575 to your computer and use it in GitHub Desktop.
Save gerdr/1243575 to your computer and use it in GitHub Desktop.
m0± core on x86
.def _m0_core;
.scl 2;
.type 32;
.endef
.text
.globl _m0_core
.align 16, 0x90
_m0_core: # @m0_core
# BB#0: # %INIT
pushl %ebp
Ltmp0:
pushl %ebx
Ltmp1:
pushl %edi
Ltmp2:
pushl %esi
Ltmp3:
subl $12, %esp
Ltmp4:
movl 32(%esp), %eax
movl 20(%eax), %ecx
movl %ecx, 8(%esp) # 4-byte Spill
movl 16(%eax), %ecx
movl 12(%eax), %edx
movl 8(%eax), %esi
movl 44(%eax), %edi
movl %edi, 4(%esp) # 4-byte Spill
movl 40(%eax), %edi
movl %edi, (%esp) # 4-byte Spill
movsd 32(%eax), %xmm0
movsd 24(%eax), %xmm1
movl (%eax), %edi
movl 4(%eax), %eax
jmpl *(%edi)
Ltmp5: # Block address taken
LBB0_1: # %YIELD
movl 32(%esp), %ebx
movl %edi, (%ebx)
movl %eax, 4(%ebx)
movl %edx, 12(%ebx)
movl %esi, 8(%ebx)
movl 8(%esp), %eax # 4-byte Reload
movl %eax, 20(%ebx)
movl %ecx, 16(%ebx)
movsd %xmm1, 24(%ebx)
movsd %xmm0, 32(%ebx)
movl (%esp), %eax # 4-byte Reload
movl %eax, 40(%ebx)
movl 4(%esp), %eax # 4-byte Reload
movl %eax, 44(%ebx)
addl $12, %esp
popl %esi
popl %edi
popl %ebx
popl %ebp
ret
.align 16, 0x90
Ltmp6: # Block address taken
LBB0_2: # %SETIA
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
movl 8(%ebx), %esi
movl 12(%ebx), %edx
leal 16(%ebx), %edi
jmpl *16(%ebx)
.align 16, 0x90
Ltmp7: # Block address taken
LBB0_3: # %SETIB
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
movl 8(%ebx), %ecx
movl 12(%ebx), %edi
movl %edi, 8(%esp) # 4-byte Spill
leal 16(%ebx), %edi
jmpl *16(%ebx)
.align 16, 0x90
Ltmp8: # Block address taken
LBB0_4: # %SETFA
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
movsd 8(%ebx), %xmm1
leal 16(%ebx), %edi
jmpl *16(%ebx)
.align 16, 0x90
Ltmp9: # Block address taken
LBB0_5: # %SETFB
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
movsd 8(%ebx), %xmm0
leal 16(%ebx), %edi
jmpl *16(%ebx)
.align 16, 0x90
Ltmp10: # Block address taken
LBB0_6: # %SETPA
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
movl 8(%ebx), %edi
movl %edi, (%esp) # 4-byte Spill
leal 16(%ebx), %edi
jmpl *16(%ebx)
.align 16, 0x90
Ltmp11: # Block address taken
LBB0_7: # %SETPB
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
movl 8(%ebx), %edi
movl %edi, 4(%esp) # 4-byte Spill
leal 16(%ebx), %edi
jmpl *16(%ebx)
.align 16, 0x90
Ltmp12: # Block address taken
LBB0_8: # %ADDIA
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
addl %ecx, %esi
adcl 8(%esp), %edx # 4-byte Folded Reload
leal 8(%ebx), %edi
jmpl *8(%ebx)
.align 16, 0x90
Ltmp13: # Block address taken
LBB0_9: # %ADDIB
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
addl %esi, %ecx
adcl %edx, 8(%esp) # 4-byte Folded Spill
leal 8(%ebx), %edi
jmpl *8(%ebx)
.align 16, 0x90
Ltmp14: # Block address taken
LBB0_10: # %ADDFA
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
addsd %xmm0, %xmm1
leal 8(%ebx), %edi
jmpl *8(%ebx)
.align 16, 0x90
Ltmp15: # Block address taken
LBB0_11: # %ADDFB
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
addsd %xmm1, %xmm0
leal 8(%ebx), %edi
jmpl *8(%ebx)
.align 16, 0x90
Ltmp16: # Block address taken
LBB0_12: # %OFFSETPA
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
movl 8(%ebx), %edi
imull %esi, %edi
addl %edi, (%esp) # 4-byte Folded Spill
leal 16(%ebx), %edi
jmpl *16(%ebx)
.align 16, 0x90
Ltmp17: # Block address taken
LBB0_13: # %OFFSETPB
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
movl 8(%ebx), %edi
imull %ecx, %edi
addl %edi, 4(%esp) # 4-byte Folded Spill
leal 16(%ebx), %edi
jmpl *16(%ebx)
.align 16, 0x90
Ltmp18: # Block address taken
LBB0_14: # %GETIA
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
movl 8(%ebx), %esi
movl 4(%eax,%esi,8), %edx
movl (%eax,%esi,8), %esi
leal 16(%ebx), %edi
jmpl *16(%ebx)
.align 16, 0x90
Ltmp19: # Block address taken
LBB0_15: # %GETIB
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
movl 8(%ebx), %ecx
movl 4(%eax,%ecx,8), %edi
movl %edi, 8(%esp) # 4-byte Spill
movl (%eax,%ecx,8), %ecx
leal 16(%ebx), %edi
jmpl *16(%ebx)
.align 16, 0x90
Ltmp20: # Block address taken
LBB0_16: # %GETFA
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
movl 8(%ebx), %edi
movsd (%eax,%edi,8), %xmm1
leal 16(%ebx), %edi
jmpl *16(%ebx)
.align 16, 0x90
Ltmp21: # Block address taken
LBB0_17: # %GETFB
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
movl 8(%ebx), %edi
movsd (%eax,%edi,8), %xmm0
leal 16(%ebx), %edi
jmpl *16(%ebx)
.align 16, 0x90
Ltmp22: # Block address taken
LBB0_18: # %GETPA
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
movl 8(%ebx), %edi
movl (%eax,%edi,8), %edi
movl %edi, (%esp) # 4-byte Spill
leal 16(%ebx), %edi
jmpl *16(%ebx)
.align 16, 0x90
Ltmp23: # Block address taken
LBB0_19: # %GETPB
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
movl 8(%ebx), %edi
movl (%eax,%edi,8), %edi
movl %edi, 4(%esp) # 4-byte Spill
leal 16(%ebx), %edi
jmpl *16(%ebx)
.align 16, 0x90
Ltmp24: # Block address taken
LBB0_20: # %PUTIA
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
movl 8(%ebx), %edi
movl %edx, 4(%eax,%edi,8)
movl %esi, (%eax,%edi,8)
leal 16(%ebx), %edi
jmpl *16(%ebx)
.align 16, 0x90
Ltmp25: # Block address taken
LBB0_21: # %PUTIB
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
movl 8(%ebx), %edi
movl 8(%esp), %ebp # 4-byte Reload
movl %ebp, 4(%eax,%edi,8)
movl %ecx, (%eax,%edi,8)
leal 16(%ebx), %edi
jmpl *16(%ebx)
.align 16, 0x90
Ltmp26: # Block address taken
LBB0_22: # %PUTFA
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
movl 8(%ebx), %edi
movsd %xmm1, (%eax,%edi,8)
leal 16(%ebx), %edi
jmpl *16(%ebx)
.align 16, 0x90
Ltmp27: # Block address taken
LBB0_23: # %PUTFB
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
movl 8(%ebx), %edi
movsd %xmm0, (%eax,%edi,8)
leal 16(%ebx), %edi
jmpl *16(%ebx)
.align 16, 0x90
Ltmp28: # Block address taken
LBB0_24: # %PUTPA
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
movl 8(%ebx), %edi
movl (%esp), %ebp # 4-byte Reload
movl %ebp, (%eax,%edi,8)
leal 16(%ebx), %edi
jmpl *16(%ebx)
.align 16, 0x90
Ltmp29: # Block address taken
LBB0_25: # %PUTPB
# =>This Inner Loop Header: Depth=1
movl %edi, %ebx
movl 8(%ebx), %edi
movl 4(%esp), %ebp # 4-byte Reload
movl %ebp, (%eax,%edi,8)
leal 16(%ebx), %edi
jmpl *16(%ebx)
.data
.globl _M0_COREOPS # @M0_COREOPS
.align 16
_M0_COREOPS:
.long Ltmp5
.long Ltmp6
.long Ltmp7
.long Ltmp8
.long Ltmp9
.long Ltmp10
.long Ltmp11
.long Ltmp12
.long Ltmp13
.long Ltmp14
.long Ltmp15
.long Ltmp16
.long Ltmp17
.long Ltmp18
.long Ltmp19
.long Ltmp20
.long Ltmp21
.long Ltmp22
.long Ltmp23
.long Ltmp24
.long Ltmp25
.long Ltmp26
.long Ltmp27
.long Ltmp28
.long Ltmp29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment