Changeset 182487c6 in mainline


Ignore:
Timestamp:
2019-01-22T21:36:42Z (6 years ago)
Author:
Vojtech Horky <vojtech.horky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3fea752
Parents:
e5ace7d7
git-author:
Vojtech Horky <vojtech.horky@…> (2019-01-22 15:51:00)
git-committer:
Vojtech Horky <vojtech.horky@…> (2019-01-22 21:36:42)
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

    re5ace7d7 r182487c6  
    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

    re5ace7d7 r182487c6  
    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.