Created
June 9, 2014 11:15
Revisions
-
tibbe created this gist
Jun 9, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ {-# LANGUAGE MagicHash #-} {-# LANGUAGE UnboxedTuples #-} module Test where import GHC.Exts add :: MutableByteArray# s -> Int# -> Int# -> State# s -> (# State# s, Int# #) add mba ix n s = fetchAddIntArray# mba ix n s nand :: MutableByteArray# s -> Int# -> Int# -> State# s -> (# State# s, Int# #) nand mba ix n s = fetchNandIntArray# mba ix n s cas :: MutableByteArray# s -> Int# -> Int# -> Int# -> State# s -> (# State# s, Int# #) cas mba ix old val s = casIntArray# mba ix old val s read :: MutableByteArray# s -> Int# -> Int# -> State# s -> State# s read mba ix n s = writeIntArray# mba ix n s write :: MutableByteArray# s -> Int# -> State# s -> (# State# s, Int# #) write mba ix s = atomicReadIntArray# mba ix s This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,152 @@ .data .align 3 .align 0 .globl __stginit_main:Test __stginit_main:Test: .data .align 3 .align 0 .globl Test.write_closure Test.write_closure: .quad Test.write_info .text .align 3 Test.write_info_dsp: .text .align 3 .quad 12884901902 .quad 0 .quad 15 .globl Test.write_info Test.write_info: _c1CK: shlq $3,%rsi leaq 16(%r14),%rax addq %rsi,%rax movq (%rax),%rax movq %rax,%rbx jmp *(%rbp) .long Test.write_info - Test.write_info_dsp .data .align 3 .align 0 .globl Test.read_closure Test.read_closure: .quad Test.read_info .text .align 3 Test.read_info_dsp: .text .align 3 .quad 17179869204 .quad 0 .quad 15 .globl Test.read_info Test.read_info: _c1CX: movq %rdi,16(%r14,%rsi,8) jmp *(%rbp) .long Test.read_info - Test.read_info_dsp .data .align 3 .align 0 .globl Test.cas_closure Test.cas_closure: .quad Test.cas_info .text .align 3 .globl Test.cas_slow Test.cas_slow: _c1D5: movq 24(%rbp),%r8 movq 16(%rbp),%rdi movq 8(%rbp),%rsi movq (%rbp),%r14 addq $32,%rbp jmp Test.cas_info .text .align 3 Test.cas_info_dsp: .text .align 3 .quad Test.cas_slow-(Test.cas_info)+0 .quad 900 .quad 0 .quad 21474836480 .quad 0 .quad 15 .globl Test.cas_info Test.cas_info: _c1Dd: shlq $3,%rsi leaq 16(%r14),%rax addq %rsi,%rax movq %rax,%rbx movq %rdi,%rax lock cmpxchgq %r8,(%rbx) movq %rax,%rbx jmp *(%rbp) .long Test.cas_info - Test.cas_info_dsp .data .align 3 .align 0 .globl Test.nand_closure Test.nand_closure: .quad Test.nand_info .text .align 3 Test.nand_info_dsp: .text .align 3 .quad 17179869204 .quad 0 .quad 15 .globl Test.nand_info Test.nand_info: _c1Dx: shlq $3,%rsi leaq 16(%r14),%rax addq %rsi,%rax movq %rax,%rbx movq (%rax),%rax _n1DF: movq %rax,%rcx movq %rax,%rdx andq %rdi,%rdx notq %rdx lock cmpxchgq %rdx,(%rbx) jne _n1DF movq %rcx,%rbx jmp *(%rbp) .long Test.nand_info - Test.nand_info_dsp .data .align 3 .align 0 .globl Test.add_closure Test.add_closure: .quad Test.add_info .text .align 3 Test.add_info_dsp: .text .align 3 .quad 17179869204 .quad 0 .quad 15 .globl Test.add_info Test.add_info: _c1DQ: shlq $3,%rsi leaq 16(%r14),%rax addq %rsi,%rax lock xaddq %rdi,(%rax) movq %rdi,%rbx jmp *(%rbp) .long Test.add_info - Test.add_info_dsp .const_data .align 3 .align 0 S1E1_srt: