delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/29/22:32:39

From: "Marp" <Marp AT 0 DOT 0 DOT 0 DOT 0>
Newsgroups: comp.os.msdos.djgpp
Subject: Assembly problem
Date: Sat, 29 Jan 2000 22:06:51 -0500
Organization: MindSpring Enterprises
Lines: 28
Message-ID: <8709ug$b2e$1@nntp6.atl.mindspring.net>
NNTP-Posting-Host: c7.b7.cf.2b
X-Server-Date: 30 Jan 2000 03:08:00 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I've been working on building the source to Quake. Building them with DJGPP
is no problem. However I want to build GLQuake for windows and some of the
asm source files won't assemble with gas (v 2.9.4) for MINGW32 (I have the C
only version working). The one asm source file I tried fixing was math.S.
Anyway this was the offending line:

jmp Ljmptab(,%eax,4)

And the error message:

C:/WINDOWS/TEMP\ccZTBjgb.s: Assembler messages:
C:/WINDOWS/TEMP\ccZTBjgb.s:287: Error: suffix or operands invalid for `jmp'

Note that with gas for DJGPP, the assembler doesn't complain about this
line. Anyway what I did was I compiled the C equivalent of the function and
examined the asm output of the compiler. I came up with this replacement for
that line:

movl    Ljmptab(,%eax,4),%eax
jmp     *%eax

Okay so here's my question. Is this a proper fix for this problem, and if
not, what should I have done? I don't really know asm so please keep that in
mind when responding. Thanks in advance.

Marp


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019