Date: Mon, 29 Jul 2013 05:11:09 +0400 From: Solar Designer <solar@...nwall.com> To: john-dev@...ts.openwall.com Subject: Re: Parallella: bcrypt Katja - On Mon, Jul 29, 2013 at 05:07:03AM +0400, Solar Designer wrote: > On Mon, Jul 29, 2013 at 02:04:06AM +0200, Katja Malvoni wrote: > > [...] I need a way to preload P arrays in > > assembly and implementing whole loop in assembly was my only idea. > > When you're still using gcc's inline asm, would you be able to declare > those 36 registers as clobbered? I thought you mentioned a list of 30 > regs specified in the asm statement - does this apply to clobbered regs > as well? If you can't specify all 36, then with inline asm you'd be > stuck between suboptimal code (preloading fewer than all 36 elements) > and unreliable code (which may break with any recompile in a slightly > different environment). So this would be yet another reason for you to > move to using a separate assembly source file. Oh, you would have a third option here, although it's also suboptimal: preload all 36 regs, but for those you could not declare as being clobbered you'd have to manually save/restore them from an array in local memory (you'd have to do that regardless of whether the regs were actually in use for something else in a given build or not, since your code would not know that). Actually, this is not more suboptimal than a separate assembly file would be, where you'd also have to save/restore all callee-saved registers that you use, regardless of whether the caller actually depends on that or not... Alexander
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.