From d891064218c362387465ab1ad98e438d8d0b4b91 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sat, 14 Feb 2004 11:54:09 +0000 Subject: Give gcc branch prediction some hits on obviously unlikely branches --- ldso/ldso/i386/elfinterp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ldso/ldso/i386') diff --git a/ldso/ldso/i386/elfinterp.c b/ldso/ldso/i386/elfinterp.c index 362df3c96..a80dcad54 100644 --- a/ldso/ldso/i386/elfinterp.c +++ b/ldso/ldso/i386/elfinterp.c @@ -217,7 +217,7 @@ _dl_parse(struct elf_resolve *tpnt, struct dyn_elf *scope, if (symtab_index) _dl_dprintf(2, "symbol '%s': ", strtab + symtab[symtab_index].st_name); - if (res <0) + if (unlikely(res <0)) { int reloc_type = ELF32_R_TYPE(rpnt->r_info); #if defined (__SUPPORT_LD_DEBUG__) @@ -227,7 +227,7 @@ _dl_parse(struct elf_resolve *tpnt, struct dyn_elf *scope, #endif _dl_exit(-res); } - else if (res >0) + if (unlikely(res >0)) { _dl_dprintf(2, "can't resolve symbol\n"); return res; -- cgit v1.2.3