View Single Post
Old 09 January 2017, 17:08   #6
nogginthenog
Amigan
 
Join Date: Feb 2012
Location: London
Posts: 1,311
Seems to be a problem with the inlines or protos:

Code:
#include <proto/dos.h>
void test()
{
   Open("",MODE_OLDFILE);
}
/opt/m68k-amigaos/bin/m68k-amigaos-gcc test.c

Code:
In file included from /opt/m68k-amigaos/os-include/inline/dos.h:16:0,
                 from /opt/m68k-amigaos/os-include/proto/dos.h:13,
                 from test.c:1:
test.c: In function âtestâ:
test.c:5:4: error: asm-specifier for variable â_Open_reâ conflicts with asm clobber list
    Open("",MODE_OLDFILE);
    ^
test.c:5:4: error: asm-specifier for variable â_n1â conflicts with asm clobber list
The preprocessor expands the above to this. I don't have 2.95 to hand but I'll see what it produces later.

Code:
void test() 
{
  ({
    CONST_STRPTR _Open_v1 = (
      ""
    );LONG _Open_v2 = (1005); {
      register BPTR _Open_re __asm("d0");
      register struct Library *
        const _Open_bn __asm("a6") = (struct Library * )(DOSBase);
      register CONST_STRPTR _n1 __asm(
        "d1"
      ) = _Open_v1;
      register LONG _n2 __asm(
        "d2"
      ) = _Open_v2;
      __asm volatile("jsr a6@(-"
        "0x1e"
        ":W)": "=r" (_Open_re): "r" (_Open_bn), "rf" (_n1), "rf" (_n2): "d0", "d1", "a0", "a1", "fp0", "fp1", "cc", "memory");
      _Open_re;
    }
  });
}

Last edited by nogginthenog; 09 January 2017 at 17:22.
nogginthenog is offline  
 
Page generated in 0.04266 seconds with 11 queries