[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrUQ_uMLEn3O-Vmu0vOm_4qRYxgj8YZOUJE13SDMqQmBPQ@mail.gmail.com>
Date: Wed, 20 May 2015 13:53:45 -0700
From: Andy Lutomirski <luto@...capital.net>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: "H.J. Lu" <hjl.tools@...il.com>, Borislav Petkov <bp@...en8.de>,
Jan Beulich <JBeulich@...e.com>,
Binutils <binutils@...rceware.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: Avoiding unnecessary jump relocations in gas?
On Mon, May 18, 2015 at 1:34 PM, H. Peter Anvin <hpa@...or.com> wrote:
> On 05/18/2015 01:28 PM, H. Peter Anvin wrote:
>>
>> OK, that is probably too recent. The simplest answer I think is just to
>> .balign 16 each vector. This is init space... some extra padding really
>> doesn't matter.
>>
>> Patch attached (still in compile test).
>>
>
> Corrected.
Egads. Now I understand what that code is. I don't like the balign,
since this has nothing to do with alignment -- we're creating an array
of functions.
Can't we make it explicit?
#define EARLY_IDT_HANDLER_STRIDE 9
...
.rept NUM_EXCEPTION_VECTORS
. = early_idt_handlers + i * EARLY_IDT_HANDLER_STRIDE
.if (EXCEPTION_ERRCODE_MASK >> i) & 1
ASM_NOP2
.else
pushl $0 # Dummy error code, to make stack frame uniform
.endif
pushl $i # 20(%esp) Vector number
jmp early_idt_handler
i = i + 1
.endr
gas will error out if we try to move . backwards, so this should be safe.
--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists