VIA PadLock support

Michal Ludvig mludvig@suse.cz
Thu Mar 11 17:05:00 GMT 2004


Alan Modra told me that:
> On Thu, Mar 11, 2004 at 04:08:10PM +0100, Michal Ludvig wrote:
> 
> I think it would be better to warn if a rep prefix is given with these
> instructions. 

Hmm, I wanted to be able to pass the output of 'objdump -d' back to gas 
and get the same output. In the revised patch I'm doing a special 
handling of the REPE prefix now.

> Also, do any of these instructions take a lock prefix?
> Since rep and lock are mutually exclusive on other x86 archs, the
> assembler warns if you use both.
> 
> Assuming lock isn't allowed,
>  - then your changes aren't correct as you'll lose the lock warning.  
>  - you could dipense with the add_prefix change, and instead check
>    i.prefix[LOCKREP_PREFIX] in the following code before calling
>    add_prefix.

OK, now it complains if lock is used and the new parameter of add_prefix 
is removed again.

>>+      if (i.tm.cpu_flags & CpuPadLock) {
>>+	if (i.tm.base_opcode & 0xff000000)
>>+	  add_prefix ((i.tm.base_opcode >> 24) & 0xff, 1);
>>+      }	else {
>>+	if (i.tm.base_opcode & 0xff0000)
>>+	  add_prefix ((i.tm.base_opcode >> 16) & 0xff, 0);
>>+      }
> 
> Formatting here and elsewhere.  Braces go on separate lines.

Fixed (hopefully :-)

Any other problems with my patch or can I commit it?

Michal Ludvig
-- 
SUSE Labs                    mludvig@suse.cz | Cray is the only computer
(+420) 296.545.373        http://www.suse.cz | that runs an endless loop
Personal homepage http://www.logix.cz/michal | in just four hours.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: binutils-padlock-2.diff
URL: <https://sourceware.org/pipermail/binutils/attachments/20040311/cd1a70c4/attachment.ksh>


More information about the Binutils mailing list