[PATCH] Evaluate syscall parameters on ARM LOAD_ARGS_x macros

Khem Raj kraj at mvista.com
Thu Mar 27 17:48:15 UTC 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bernhard Fischer wrote:
| On Thu, Mar 27, 2008 at 10:07:54AM -0700, Khem Raj wrote:
|> -----BEGIN PGP SIGNED MESSAGE-----
|> Hash: SHA1
|>
|> Bernhard Fischer wrote:
|> | On Thu, Mar 27, 2008 at 01:57:02AM -0700, Khem Raj wrote:
|> |> -----BEGIN PGP SIGNED MESSAGE-----
|> |> Hash: SHA1
|> |>
|> |> Hi
|> |>
|> |> While compiling uclibc on thumb and running LTP tests on it I noticed
|> |> that the sched_setaffinity system calls were failing. The reason
is that
|> |> when the parameters to syscall macros on ARM contain function
calls, gcc
|> |> places the calls to evaluate the parameters at the very end just
before
|> |> the system call instruction (SVC) is called.
|> |> This corrupts the registers that has been set up for the system call.
|> |>
|> |> This patch evaluates the arguments in LOAD_ARGS_x macros and also
|> |> separates declaration to make it more PPC like. Thanks to Daniel
|> |> Jacobowitz for this suggestion.
|> |
|> | Khem,
|> |
|> | Since you seem to use ARM, may i ask you to take a look and clean-up
|> | syscalls.h? Specifically this one spot:
|> |
|> | The INTERNAL_SYSCALL macro is duplicated, apparently needlessly.
|> | Search for "r7, v3" in libc/sysdeps/linux/arm/bits/syscalls.h
|>
|> There are 4 different variants of INTERNAL_SYSCALL
|
| 2 of them are identical, AFAICS.

hmmm the thumb ones. Now those needs patch to get rid of push/pop too.
IIRC Paul Brook sent this patch I forgot to merge it.
I will do that today. Now i dont know if the OABI one still works. I
know the EABI one works.

Thanks

- --
Khem Raj
MontaVista Software Inc.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH693fUjbQJxVzeZQRArmaAJ9KEIFanI1ZYZSBAgxte3Hqags/XQCeLnMC
WAqAjCuVgPWLD3cnzU1bzQI=
=VCJw
-----END PGP SIGNATURE-----



More information about the uClibc mailing list