Created
March 16, 2010 23:20
-
-
Save MSch/334658 to your computer and use it in GitHub Desktop.
This file contains 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 characters
.text | |
.align 4,0x90 | |
.globl _asma | |
_asma: | |
Leh_func_begin1: | |
pushq %rbp | |
Llabel1: | |
movq %rsp, %rbp | |
Llabel2: | |
xorl %eax, %eax | |
.align 4,0x90 | |
LBB1_1: | |
movb (%rdi,%rax), %cl | |
movb %cl, %dl | |
addb $191, %dl | |
cmpb $26, %dl | |
setb %dl | |
shlb $5, %dl | |
addb %cl, %dl | |
movb %dl, (%rdi,%rax) | |
incq %rax | |
cmpq $16, %rax | |
jne LBB1_1 | |
movq %rdi, %rax | |
popq %rbp | |
ret | |
Leh_func_end1: | |
.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support | |
EH_frame0: | |
Lsection_eh_frame: | |
Leh_frame_common: | |
.set Lset1eh,Leh_frame_common_end-Leh_frame_common_begin | |
.long Lset1eh | |
Leh_frame_common_begin: | |
.long 0x0 | |
.byte 0x1 | |
.asciz "zR" | |
.byte 0x1 | |
.byte 0x78 | |
.byte 0x10 | |
.byte 0x1 | |
.byte 0x1B | |
.byte 0xC | |
.byte 0x7 | |
.byte 0x8 | |
.byte 0x90 | |
.byte 0x1 | |
.align 3 | |
Leh_frame_common_end: | |
.globl _Lasma.eh | |
_Lasma.eh: | |
.set Lset2eh,Leh_frame_end1-Leh_frame_begin1 | |
.long Lset2eh | |
Leh_frame_begin1: | |
.long Leh_frame_begin1-EH_frame0 | |
.long Leh_func_begin1-. | |
.set Lset3eh,Leh_func_end1-Leh_func_begin1 | |
.long Lset3eh | |
.byte 0x0 | |
.byte 0x4 | |
.set Lset4eh,Llabel1-Leh_func_begin1 | |
.long Lset4eh | |
.byte 0xE | |
.byte 0x10 | |
.byte 0x86 | |
.byte 0x2 | |
.byte 0x4 | |
.set Lset5eh,Llabel2-Llabel1 | |
.long Lset5eh | |
.byte 0xD | |
.byte 0x6 | |
.align 3 | |
Leh_frame_end1: | |
.subsections_via_symbols |
This file contains 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 characters
; ModuleID = 'asma_ref.c' | |
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128" | |
target triple = "x86_64-apple-darwin10.0" | |
define i8* @asma(i8* %s) nounwind { | |
; <label>:0 | |
br label %._crit_edge4 | |
._crit_edge4: ; preds = %._crit_edge4, %0 | |
%indvar = phi i64 [ 0, %0 ], [ %indvar.next, %._crit_edge4 ] ; <i64> [#uses=2] | |
%1 = getelementptr i8* %s, i64 %indvar ; <i8*> [#uses=2] | |
%2 = load i8* %1 ; <i8> [#uses=2] | |
%.off = add i8 %2, -65 ; <i8> [#uses=1] | |
%or.cond = icmp ugt i8 %.off, 25 ; <i1> [#uses=1] | |
%3 = select i1 %or.cond, i8 0, i8 32 ; <i8> [#uses=1] | |
%4 = add i8 %3, %2 ; <i8> [#uses=1] | |
store i8 %4, i8* %1 | |
%indvar.next = add i64 %indvar, 1 ; <i64> [#uses=2] | |
%exitcond = icmp eq i64 %indvar.next, 16 ; <i1> [#uses=1] | |
br i1 %exitcond, label %._crit_edge, label %._crit_edge4 | |
._crit_edge: ; preds = %._crit_edge4 | |
ret i8* %s | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment