This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Gas is broken for x86-64


On Fri, Nov 05, 2004 at 07:41:36PM -0500, Daniel Jacobowitz wrote:
> On Fri, Nov 05, 2004 at 03:17:59PM -0800, H. J. Lu wrote:
> > On Fri, Nov 05, 2004 at 03:04:29PM -0800, H. J. Lu wrote:
> > > On Fri, Nov 05, 2004 at 03:00:27PM -0800, H. J. Lu wrote:
> > > > On Fri, Nov 05, 2004 at 02:47:58PM -0800, H. J. Lu wrote:
> > > > > Hi Jan,
> > > > > 
> > > > > Your i386 opcode change breaks x86-64. I got
> > > > > 
> > > > > [hjl@gnu-64 gas]$ cat /tmp/x.s
> > > > > movzb (%rax),%edx
> > > > > [hjl@gnu-64 gas]$ ./as-new -o x.o /tmp/x.s
> > > > > /tmp/x.s: Assembler messages:
> > > > > /tmp/x.s:1: Error: no such instruction: `movzb (%rax),%edx'
> > > > > 
> > > > > 
> > > > 
> > > > Your patch
> > > > 
> > > > http://sources.redhat.com/ml/binutils/2004-11/msg00033/binutils-mainline-x86-intel-syntax.patch
> > > > 
> > > > removed movzb. It is wrong.
> > > 
> > > BTW, do you know what other instructions you have removed? We can't
> > > remove any of them unless we have a very good reason.
> > > 
> > 
> > I checked in a patch to restore "movzb":
> > 
> > http://sources.redhat.com/ml/binutils-cvs/2004-11/msg00045.html
> 
> Then please add this to the testsuite.
> 

Good idea. I will check in this patch shortly.


H.J.
---
2004-11-05  H.J. Lu  <hongjiu.lu@intel.com>

	* gas/i386/general.s: Add movzb.
	* gas/i386/general.l: Updated.

--- gas/i386/general.l.movzb	2000-05-02 10:23:27.000000000 -0700
+++ gas/i386/general.l	2004-11-05 17:14:27.350938946 -0800
@@ -285,6 +285,10 @@
  212 021d 67668984 248C0000 		movl	%eax,140\(%esp\)
  212      00
  213                       	
- 214                       		# Force a good alignment.
- 215 0226 00000000 00000000 		.p2align	4,0
- 215      0000
+ 214                       	.code32
+ 215                       	# Make sure that we won't remove movzb by accident.
+ 216 0226 660FB6F8          		movzb	%al,%di
+ 217 022a 0FB6C8            		movzb	%al,%ecx
+ 218                       	
+ 219                       		# Force a good alignment.
+ 220 022d 000000            		.p2align	4,0
--- gas/i386/general.s.movzb	2000-04-03 09:46:40.000000000 -0700
+++ gas/i386/general.s	2004-11-05 17:14:32.479276317 -0800
@@ -211,5 +211,10 @@
 	leal	-1760(%ebp),%ebx
 	movl	%eax,140(%esp)
 
+.code32
+# Make sure that we won't remove movzb by accident.
+	movzb	%al,%di
+	movzb	%al,%ecx
+
 	# Force a good alignment.
 	.p2align	4,0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]