search for: cmpl

Displaying 20 results from an estimated 257 matches for "cmpl".

2010 Oct 07
2
[LLVMdev] [Q] x86 peephole deficiency
...125) and now I am running into a deficiency of the x86 peephole optimizer (or jump-threader?). Here is what I get: andl $3, %edi je .LBB0_4 # BB#2: # %nz # in Loop: Header=BB0_1 Depth=1 cmpl $2, %edi je .LBB0_6 # BB#3: # %nz.non-middle # in Loop: Header=BB0_1 Depth=1 cmpl $2, %edi jbe .LBB0_4 # BB#5: # %sw.bb6 ret the second ...
2006 May 25
2
Compilation issues with s390
Hi all, I'm trying to compile asterisk on the mainframe (s390 / s390x) and I am running into issues. I was wondering if somebody could give a hand? I'm thinking that I should be able to do this. I have noticed that Debian even has binary RPM's out for Asterisk now. I'm trying to do this on SuSE SLES8 (with the 2.4 kernel). What I see is, an issue that arch=s390 isn't
2016 Nov 17
4
RFC: Insertion of nops for performance stability
...eturn 0; } The two last || clauses of the if will be translated to two conditional jumps to the same target. The generated code will look like so: foo: 0: 48 8b 44 24 28 movq 40(%rsp), %rax 5: 8b 00 movl (%rax), %eax 7: 01 c8 addl %ecx, %eax 9: 44 39 c0 cmpl %r8d, %eax c: 75 0f jne 15 <foo+0x1D> e: ff 05 00 00 00 00 incl (%rip) 14: ff 05 00 00 00 00 incl (%rip) 1a: 31 c0 xorl %eax, %eax 1c: c3 retq 1d: 44 39 c9 cmpl %r9d, %ecx 20: 74 ec je -20 <foo+0xE> 2...
2010 Oct 07
0
[LLVMdev] [Q] x86 peephole deficiency
...cy of the x86 > peephole optimizer (or jump-threader?). Here is what I get: > > > andl $3, %edi > je .LBB0_4 > # BB#2: # %nz > # in Loop: Header=BB0_1 > Depth=1 > cmpl $2, %edi > je .LBB0_6 > # BB#3: # %nz.non-middle > # in Loop: Header=BB0_1 > Depth=1 > cmpl $2, %edi > jbe .LBB0_4 > # BB#5: # %sw....
2015 Sep 30
2
Optimizing jumps to identical code blocks
...gly. I created a gist here: https://gist.github.com/ranma42/d2e6d50999e801ffd4ed (based on two examples available in Rust issues: https://github.com/rust-lang/rust/pull/24270#issuecomment-136681741 https://github.com/rust-lang/rust/issues/13623#issuecomment-136700526 ) In "enum4.s" cmpl $1, %eax je LBB0_5 cmpl $2, %eax je LBB0_5 cmpl $3, %eax LBB0_5: could be removed. (Further optimization would be possible by observing that the two 32-bit comparison could be unified into a single 64-bit comparison, but I believe this is a different issue) In &quot...
2009 Mar 03
3
[LLVMdev] Tight overlapping loops and performance
...mple still seems intact. From LLVM SVN, converted to asm via llc: .text .align 4,0x90 .globl _main _main: subl $12, %esp movl $1999, %eax xorl %ecx, %ecx movl $1999, %edx .align 4,0x90 LBB1_1: ## loopto cmpl $1, %eax leal -1(%eax), %eax cmove %edx, %eax incl %ecx cmpl $999999999, %ecx jne LBB1_1 ## loopto LBB1_2: ## bb1 movl %eax, 4(%esp) movl $LC, (%esp) call _printf xorl %eax, %eax addl $...
2016 Nov 20
3
RFC: Insertion of nops for performance stability
...eturn 0; } The two last || clauses of the if will be translated to two conditional jumps to the same target. The generated code will look like so: foo: 0: 48 8b 44 24 28 movq 40(%rsp), %rax 5: 8b 00 movl (%rax), %eax 7: 01 c8 addl %ecx, %eax 9: 44 39 c0 cmpl %r8d, %eax c: 75 0f jne 15 <foo+0x1D> e: ff 05 00 00 00 00 incl (%rip) 14: ff 05 00 00 00 00 incl (%rip) 1a: 31 c0 xorl %eax, %eax 1c: c3 retq 1d: 44 39 c9 cmpl %r9d, %ecx 20: 74 ec je -20 <foo+0xE> 2...
2015 Sep 01
2
[RFC] New pass: LoopExitValues
...Values ------------------------------- matrix_mul: testl %edi, %edi je .LBB0_5 xorl %r9d, %r9d xorl %r8d, %r8d .LBB0_2: xorl %r11d, %r11d .LBB0_3: movl %r9d, %r10d movl (%rdx,%r10,4), %eax imull %ecx, %eax movl %eax, (%rsi,%r10,4) incl %r11d incl %r9d cmpl %r11d, %edi jne .LBB0_3 incl %r8d cmpl %edi, %r8d jne .LBB0_2 .LBB0_5: retq Without LoopExitValues: ----------------------------------- matrix_mul: pushq %rbx # Eliminated by L.E.V. pass .Ltmp0: .Ltmp1: testl %edi, %edi je .LBB0_5 xorl %r8d, %r8d...
2004 Aug 06
1
i need your opinion of my encoded file in ipaq 1940
...output if this is right to entered parameters. File original: http://padawan.ing.puc.cl/chavezorig.wav File encoded: http://padawan.ing.puc.cl/chavezq1.wav The parameters for encoded are: state = speex_encoder_init(&speex_nb_mode); int tmp=0; speex_encoder_ctl(state, SPEEX_SET_VBR, &tmp); cmpl=1; speex_encoder_ctl(state, SPEEX_SET_COMPLEXITY, &cmpl); quality=1; speex_encoder_ctl(state, SPEEX_SET_QUALITY, &quality); I think that the quality in ipaq is minor who the obtained one in the PC to the same quality 1. I wait your opinions. Regards. Rodrigo. <p>--- >8 ---- Lis...
2007 Apr 18
2
[patch 3/8] Allow a kernel to not be in ring 0.
....6.18-rc3-32.orig/arch/i386/kernel/entry.S +++ 2.6.18-rc3-32/arch/i386/kernel/entry.S @@ -229,8 +229,9 @@ ret_from_intr: check_userspace: movl EFLAGS(%esp), %eax # mix EFLAGS and CS movb CS(%esp), %al - testl $(VM_MASK | 3), %eax - jz resume_kernel + andl $(VM_MASK | SEGMENT_RPL_MASK), %eax + cmpl $USER_RPL, %eax + jb resume_kernel # not returning to v8086 or userspace ENTRY(resume_userspace) cli # make sure we don't miss an interrupt # setting need_resched or sigpending @@ -367,8 +368,8 @@ restore_all: # See comments in process.c:copy_thread() for details. movb OLDSS(%...
2007 Apr 18
2
[patch 3/8] Allow a kernel to not be in ring 0.
....6.18-rc3-32.orig/arch/i386/kernel/entry.S +++ 2.6.18-rc3-32/arch/i386/kernel/entry.S @@ -229,8 +229,9 @@ ret_from_intr: check_userspace: movl EFLAGS(%esp), %eax # mix EFLAGS and CS movb CS(%esp), %al - testl $(VM_MASK | 3), %eax - jz resume_kernel + andl $(VM_MASK | SEGMENT_RPL_MASK), %eax + cmpl $USER_RPL, %eax + jb resume_kernel # not returning to v8086 or userspace ENTRY(resume_userspace) cli # make sure we don't miss an interrupt # setting need_resched or sigpending @@ -367,8 +368,8 @@ restore_all: # See comments in process.c:copy_thread() for details. movb OLDSS(%...
2019 Sep 14
2
Side-channel resistant values
...ggling to find cases where __builtin_unpredictable() works at all. Even if we ignore cmp/br into switch conversion, it still doesn’t work: int test_cmov(int left, int right, int *alt) { return __builtin_unpredictable(left < right) ? *alt : 999; } Should generate: test_cmov: movl $999, %eax cmpl %esi, %edi cmovll (%rdx), %eax retq But currently generates: test_cmov: movl $999, %eax cmpl %esi, %edi jge .LBB0_2 movl (%rdx), %eax .LBB0_2: retq > On Sep 14, 2019, at 12:18 AM, Sanjay Patel <spatel at rotateright.com> wrote: > > I'm not sure if this is the entire...
2015 Jul 13
5
[LLVMdev] Poor register allocations vs gcc
...-S Versions (latest for each, downloaded just a few days ago): gcc : 5.1 clang/llvm: clang+llvm-3.6.1-x86_64-apple-darwin Host: osx yosemite. The assembly (cut to the essential): LLVM: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movl %edi, %r14d leal 71(%r14), %eax xorl %ecx, %ecx cmpl $56, %eax movl $92, %ebx cmovnel %ecx, %ebx leaq L_.str(%rip), %rdi callq _puts leal 71(%rbx,%r14), %eax popq %rbx popq %r14 popq %rbp retq and the gcc one: pushq %rbp movl $0, %eax movl $92, %ebp pushq %rbx leal 71(%rdi), %ebx leaq LC1(%rip), %rdi subq $8, %rsp cmpl $56,...
2015 Aug 31
2
[RFC] New pass: LoopExitValues
Hello LLVM, This is a proposal for a new pass that improves performance and code size in some nested loop situations. The pass is target independent. >From the description in the file header: This optimization finds loop exit values reevaluated after the loop execution and replaces them by the corresponding exit values if they are available. Such sequences can arise after the
2009 Feb 05
2
[LLVMdev] LLVM misses some cross-MBB and loop optimizations compared to GCC
...loads from spill slots, if the value is available on the required physical register already. For example, in the example below, the marked "movl 12(%esp), %ecx" instruction could be eliminated. .LBB2_2: # bb31 movl 12(%esp), %ecx movl 8(%esp), %eax cmpl $0, up+28(%eax,%ecx,4) je .LBB2_9 # bb569 .LBB2_3: # bb41 ; <--- bb31 is the only predecessor of bb41 movl 12(%esp), %ecx ; <--- This could be eliminated!!! movl 4(%esp), %eax cmpl $0, down(%eax,%ecx,4) je .LBB2_9 #...
2015 Feb 25
1
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...int x; int *px = &x; int main() { if (*px == 1) return 1; asm volatile("" ::: "memory"); if (*px == 1) return 1; return -1; } Now compile with gcc test.c -O3 -fwhole-program, and run objdump -d a.out: 400400: 83 3d 49 0c 20 00 01 cmpl $0x1,0x200c49(%rip) # 601050 <x> 400407: 74 09 je 400412 <main+0x12> 400409: 83 3d 40 0c 20 00 01 cmpl $0x1,0x200c40(%rip) # 601050 <x> 400410: 75 06 jne 400418 <main+0x18> 400412:...
2016 Nov 21
2
RFC: Insertion of nops for performance stability
...eturn 0; } The two last || clauses of the if will be translated to two conditional jumps to the same target. The generated code will look like so: foo: 0: 48 8b 44 24 28 movq 40(%rsp), %rax 5: 8b 00 movl (%rax), %eax 7: 01 c8 addl %ecx, %eax 9: 44 39 c0 cmpl %r8d, %eax c: 75 0f jne 15 <foo+0x1D> e: ff 05 00 00 00 00 incl (%rip) 14: ff 05 00 00 00 00 incl (%rip) 1a: 31 c0 xorl %eax, %eax 1c: c3 retq 1d: 44 39 c9 cmpl %r9d, %ecx 20: 74 ec je -20 <foo+0xE> 2...
2007 Apr 18
1
[PATCH] Slight cleanups for x86 ring macros (against rc3-mm2)
...arch/i386/kernel/entry.S --- a/arch/i386/kernel/entry.S Mon Aug 07 13:30:17 2006 +1000 +++ b/arch/i386/kernel/entry.S Mon Aug 07 14:32:11 2006 +1000 @@ -237,7 +237,7 @@ check_userspace: movl EFLAGS(%esp), %eax # mix EFLAGS and CS movb CS(%esp), %al andl $(VM_MASK | SEGMENT_RPL_MASK), %eax - cmpl $SEGMENT_RPL_MASK, %eax + cmpl $USER_RPL, %eax jb resume_kernel # not returning to v8086 or userspace ENTRY(resume_userspace) DISABLE_INTERRUPTS # make sure we don't miss an interrupt @@ -374,8 +374,8 @@ restore_all: # See comments in process.c:copy_thread() for details. movb OLDSS(...
2007 Apr 18
1
[PATCH] Slight cleanups for x86 ring macros (against rc3-mm2)
...arch/i386/kernel/entry.S --- a/arch/i386/kernel/entry.S Mon Aug 07 13:30:17 2006 +1000 +++ b/arch/i386/kernel/entry.S Mon Aug 07 14:32:11 2006 +1000 @@ -237,7 +237,7 @@ check_userspace: movl EFLAGS(%esp), %eax # mix EFLAGS and CS movb CS(%esp), %al andl $(VM_MASK | SEGMENT_RPL_MASK), %eax - cmpl $SEGMENT_RPL_MASK, %eax + cmpl $USER_RPL, %eax jb resume_kernel # not returning to v8086 or userspace ENTRY(resume_userspace) DISABLE_INTERRUPTS # make sure we don't miss an interrupt @@ -374,8 +374,8 @@ restore_all: # See comments in process.c:copy_thread() for details. movb OLDSS(...
2007 Apr 18
1
[PATCH] lguest: clean up some l"references .init.text" warnings
...tart_kernel */ atomic_notifier_chain_register(&panic_notifier_list, &paniced); @@ -549,7 +549,8 @@ static __attribute_used__ __init void lg start_kernel(); } -asm("lguest_maybe_init:\n" +asm(".section .init.text\n" + "lguest_maybe_init:\n" " cmpl $"__stringify(LGUEST_MAGIC_EBP)", %ebp\n" " jne 1f\n" " cmpl $"__stringify(LGUEST_MAGIC_EDI)", %edi\n"