Mail Archives: djgpp/1999/09/09/17:18:41
Sorry, pressed send button too early in previous mail)
Now about patch. It seems to be Ok. I had to do the same when tried
to build Allegro using recent binutils snapshot.
Andris
On 8 Sep 99, at 22:29, Ian Miller wrote:
> Ahem.
>
> I'm using pretty much up to date binutils 2.95
> right now. I wouldn't recommend it unless it
> doesn't matter to you much if your software
> doesn't work. That said, they do seem to
> work fine. However,...
>
> as 2.95 interprets a couple of GRX inline
> assembler call instructions as
> PC-relative and chokes on them.
> as 2.81 interpreted them as absolute
> calls, and this is evidently what the code
> intends.
>
> The following simple patch, duplicated at
> http://www.shelob.force9.co.uk/djgpp/grxasm.dif,
> applies the * prefix to the call absolute
> operands as the as 2.95 manual requires.
> It works for me.
>
> IF IN DOUBT, DO NOT APPLY THIS PATCH
>
> Happy hacking,
> Ian
> --
> Ian Miller, Dorset, UK
>
> *** src/vdrivers/vesa_pm.orig.c Mon May 11 20:20:28 1998
> --- src/vdrivers/vesa_pm.c Wed Sep 8 21:41:52 1999
> ***************
> *** 349,355 ****
> static INLINE void PM_banking(short BX, short DX) {
> __asm__ volatile (
> " pushal \n"
> ! " call %3 \n"
> " popal "
> : /* no output */
> : "a" (0x4F05), "b" (BX), "d" (DX),
> --- 349,355 ----
> static INLINE void PM_banking(short BX, short DX) {
> __asm__ volatile (
> " pushal \n"
> ! " call *%3 \n"
> " popal "
> : /* no output */
> : "a" (0x4F05), "b" (BX), "d" (DX),
> ***************
> *** 362,368 ****
> " pushal \n"
> " movw %%ax, %%es \n"
> " movw $0x4f05, %%ax \n"
> ! " call %3 \n"
> " popal "
> : /* no output */
> : "a" (es), "b" (BX), "d" (DX),
> --- 362,368 ----
> " pushal \n"
> " movw %%ax, %%es \n"
> " movw $0x4f05, %%ax \n"
> ! " call *%3 \n"
> " popal "
> : /* no output */
> : "a" (es), "b" (BX), "d" (DX),
>
>
>
>
>
>
- Raw text -