Changeset 66dda82 in rtems


Ignore:
Timestamp:
Feb 11, 2011, 11:42:36 AM (9 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.11, master
Children:
aaa026c
Parents:
bd16104
Message:

2011-02-11 Ralf Corsépius <ralf.corsepius@…>

  • include/swi.h, startup/bspreset.c, startup/syscalls.c: Use "asm" instead of "asm" for improved c99-compliance.
Location:
c/src/lib/libbsp/arm/gdbarmsim
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/gdbarmsim/ChangeLog

    rbd16104 r66dda82  
     12011-02-11      Ralf Corsépius <ralf.corsepius@rtems.org>
     2
     3        * include/swi.h, startup/bspreset.c, startup/syscalls.c:
     4        Use "__asm__" instead of "asm" for improved c99-compliance.
     5
    162011-02-02      Ralf Corsépius <ralf.corsepius@rtems.org>
    27
  • c/src/lib/libbsp/arm/gdbarmsim/include/swi.h

    rbd16104 r66dda82  
    8181{
    8282  int value;
    83   asm volatile ("mov r0, %1; mov r1, %2; " AngelSWIInsn " %a3; mov %0, r0"
     83  __asm__ volatile ("mov r0, %1; mov r1, %2; " AngelSWIInsn " %a3; mov %0, r0"
    8484       : "=r" (value) /* Outputs */
    8585       : "r" (reason), "r" (arg), "i" (AngelSWI) /* Inputs */
  • c/src/lib/libbsp/arm/gdbarmsim/startup/bspreset.c

    rbd16104 r66dda82  
    1616void bsp_reset( void )
    1717{
    18   asm ("swi %a0" :: "i" (SWI_Exit));
     18  __asm__ ("swi %a0" :: "i" (SWI_Exit));
    1919}
  • c/src/lib/libbsp/arm/gdbarmsim/startup/syscalls.c

    rbd16104 r66dda82  
    8686
    8787/* Register name faking - works in collusion with the linker.  */
    88 register char * stack_ptr asm ("sp");
     88register char * stack_ptr __asm__ ("sp");
    8989
    9090
     
    176176
    177177  name = ":tt";
    178   asm ("mov r0,%2; mov r1, #0; swi %a1; mov %0, r0"
     178  __asm__ ("mov r0,%2; mov r1, #0; swi %a1; mov %0, r0"
    179179       : "=r"(fh)
    180180       : "i" (SWI_Open),"r"(name)
     
    183183
    184184  name = ":tt";
    185   asm ("mov r0,%2; mov r1, #4; swi %a1; mov %0, r0"
     185  __asm__ ("mov r0,%2; mov r1, #4; swi %a1; mov %0, r0"
    186186       : "=r"(fh)
    187187       : "i" (SWI_Open),"r"(name)
     
    190190
    191191  name = ":tt";
    192   asm ("mov r0,%2; mov r1, #8; swi %a1; mov %0, r0"
     192  __asm__ ("mov r0,%2; mov r1, #8; swi %a1; mov %0, r0"
    193193       : "=r"(fh)
    194194       : "i" (SWI_Open),"r"(name)
     
    218218  return do_AngelSWI (AngelSWI_Reason_Errno, NULL);
    219219#else
    220   register int r0 asm("r0");
    221   asm ("swi %a1" : "=r"(r0) : "i" (SWI_GetErrno));
     220  register int r0 __asm__ ("r0");
     221  __asm__ ("swi %a1" : "=r"(r0) : "i" (SWI_GetErrno));
    222222  return r0;
    223223#endif
     
    259259  return checkerror (do_AngelSWI (AngelSWI_Reason_Read, block));
    260260#else
    261   register int r0 asm("r0");
    262   register int r1 asm("r1");
    263   register int r2 asm("r2");
     261  register int r0 __asm__ ("r0");
     262  register int r1 __asm__ ("r1");
     263  register int r2 __asm__ ("r2");
    264264  r0 = fh;
    265265  r1 = (int)ptr;
    266266  r2 = len;
    267   asm ("swi %a4"
     267  __asm__ ("swi %a4"
    268268       : "=r" (r0)
    269269       : "0"(r0), "r"(r1), "r"(r2), "i"(SWI_Read));
     
    361361  if (dir == SEEK_END)
    362362    {
    363       asm ("mov r0, %2; swi %a1; mov %0, r0"
     363      __asm__ ("mov r0, %2; swi %a1; mov %0, r0"
    364364           : "=r" (res)
    365365           : "i" (SWI_Flen), "r" (pfd->handle)
     
    372372
    373373  /* This code only does absolute seeks.  */
    374   asm ("mov r0, %2; mov r1, %3; swi %a1; mov %0, r0"
     374  __asm__ ("mov r0, %2; mov r1, %3; swi %a1; mov %0, r0"
    375375       : "=r" (res)
    376376       : "i" (SWI_Seek), "r" (pfd->handle), "r" (ptr)
     
    413413  return checkerror (do_AngelSWI (AngelSWI_Reason_Write, block));
    414414#else
    415   register int r0 asm("r0");
    416   register int r1 asm("r1");
    417   register int r2 asm("r2");
     415  register int r0 __asm__ ("r0");
     416  register int r1 __asm__ ("r1");
     417  register int r2 __asm__ ("r2");
    418418  r0 = fh;
    419419  r1 = (int)ptr;
    420420  r2 = len;
    421   asm ("swi %a4"
     421  __asm__ ("swi %a4"
    422422       : "=r" (r0)
    423423       : "0"(r0), "r"(r1), "r"(r2), "i"(SWI_Write));
     
    519519
    520520#else
    521   asm ("mov r0,%2; mov r1, %3; swi %a1; mov %0, r0"
     521  __asm__ ("mov r0,%2; mov r1, %3; swi %a1; mov %0, r0"
    522522       : "=r"(fh)
    523523       : "i" (SWI_Open),"r"(path),"r"(aflags)
     
    549549  return checkerror (do_AngelSWI (AngelSWI_Reason_Close, &fh));
    550550#else
    551   register int r0 asm("r0");
     551  register int r0 __asm__ ("r0");
    552552  r0 = fh;
    553   asm ("swi %a2"
     553  __asm__ ("swi %a2"
    554554       : "=r"(r0)
    555555       : "0"(r0), "i" (SWI_Close));
     
    600600_sbrk (int incr)
    601601{
    602   extern char end asm ("end"); /* Defined by the linker.  */
     602  extern char end __asm__ ("end"); /* Defined by the linker.  */
    603603  static char * heap_end;
    604604  char * prev_heap_end;
     
    651651  res = checkerror (do_AngelSWI (AngelSWI_Reason_FLen, &pfd->handle));
    652652#else
    653   asm ("mov r0, %2; swi %a1; mov %0, r0"
     653  __asm__ ("mov r0, %2; swi %a1; mov %0, r0"
    654654       : "=r" (res)
    655655       : "i" (SWI_Flen), "r" (pfd->handle)
     
    704704  res = do_AngelSWI (AngelSWI_Reason_Remove, block);
    705705#else
    706   register int r0 asm("r0");
     706  register int r0 __asm__ ("r0");
    707707  r0 = (int)path;
    708   asm ("swi %a2"
     708  __asm__ ("swi %a2"
    709709       : "=r"(r0)
    710710       : "0"(r0), "i" (SWI_Remove));
     
    729729      {
    730730        int value;
    731         asm ("swi %a1; mov %0, r0" : "=r" (value): "i" (SWI_Time) : "r0");
     731        __asm__ ("swi %a1; mov %0, r0" : "=r" (value): "i" (SWI_Time) : "r0");
    732732        tp->tv_sec = value;
    733733      }
     
    756756  timeval = do_AngelSWI (AngelSWI_Reason_Clock,NULL);
    757757#else
    758   asm ("swi %a1; mov %0, r0" : "=r" (timeval): "i" (SWI_Clock) : "r0");
     758  __asm__ ("swi %a1; mov %0, r0" : "=r" (timeval): "i" (SWI_Clock) : "r0");
    759759#endif
    760760  return timeval;
     
    796796  return checkerror (do_AngelSWI (AngelSWI_Reason_IsTTY, &pfd->handle));
    797797#else
    798   register int r0 asm("r0");
     798  register int r0 __asm__ ("r0");
    799799  r0 = pfd->handle;
    800   asm ("swi %a2"
     800  __asm__ ("swi %a2"
    801801       : "=r" (r0)
    802802       : "0"(r0), "i" (SWI_IsTTY));
     
    832832  return e;
    833833#else
    834   register int r0 asm("r0");
     834  register int r0 __asm__ ("r0");
    835835  r0 = (int)s;
    836   asm ("swi %a2"
     836  __asm__ ("swi %a2"
    837837       : "=r" (r0)
    838838       : "0"(r0), "i" (SWI_CLI));
     
    852852  return checkerror (do_AngelSWI (AngelSWI_Reason_Rename, block)) ? -1 : 0;
    853853#else
    854   register int r0 asm("r0");
    855   register int r1 asm("r1");
     854  register int r0 __asm__ ("r0");
     855  register int r1 __asm__ ("r1");
    856856  r0 = (int)oldpath;
    857857  r1 = (int)newpath;
    858   asm ("swi %a3"
     858  __asm__ ("swi %a3"
    859859       : "=r" (r0)
    860860       : "0" (r0), "r" (r1), "i" (SWI_Rename));
Note: See TracChangeset for help on using the changeset viewer.