Changeset 3e40b4e in mainline


Ignore:
Timestamp:
2019-01-22T15:51:15Z (5 years ago)
Author:
Vojtech Horky <vojtech.horky@…>
Parents:
05cb995
git-author:
Vojtech Horky <vojtech.horky@…> (2019-01-22 15:51:00)
git-committer:
Vojtech Horky <vojtech.horky@…> (2019-01-22 15:51:15)
Message:

ppc32, arm32: clobber memory on syscall

As the syscall may touch arbitrary memory, we need to prevent the
compiler to cache some values in registers.

This is a follow-up on the previous commit where this was fixed for
MIPS32.

Location:
uspace/lib/c/arch
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/arm32/src/syscall.c

    r05cb995 r3e40b4e  
    7070              "r" (__arm_reg_r5),
    7171              "r" (__arm_reg_r6)
     72            :
     73              /*
     74               * Clobber memory too as some arguments might be
     75               * actually pointers.
     76               */
     77              "memory"
    7278        );
    7379
  • uspace/lib/c/arch/ppc32/src/syscall.c

    r05cb995 r3e40b4e  
    5858              "r" (__ppc32_reg_r8),
    5959              "r" (__ppc32_reg_r9)
     60            :
     61              /*
     62               * Clobber memory too as some arguments might be
     63               * actually pointers.
     64               */
     65              "memory"
    6066        );
    6167
Note: See TracChangeset for help on using the changeset viewer.