[Patch, AArch64] Fix pointer assignment to param_block_t variables

Yufeng Zhang Yufeng.Zhang@arm.com
Thu Jun 27 13:47:00 GMT 2013


In the AArch64 libgloss backend, param_block_t is the base type for the 
Angle API block parameter and is defined as "long long".  Pointers are 
assigned to variables of this type via explicit casting, i.e. 
(param_block_t), which is OK when the pointer is 64-bit size but wrong 
when we have 32-bit pointers.

This patch replace the incorrect casting with a cpp macro which casts a 
pointer properly.

OK to go upstream?



         * aarch64/syscalls.c (POINTER_TO_PARAM_BLOCK_T): New macro.
         (initialise_monitor_handles): Replace the casting
         with the cpp macro POINTER_TO_PARAM_BLOCK_T.
         (_swiread): Likewise.
         (_swiwrite): Likewise.
         (_swiopen): Likewise.
         (_unlink): Likewise.
         (_system): Likewise.
         (_rename): Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 02-ptr-to-param_block_t.patch
Type: text/x-patch
Size: 3122 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20130627/4305e949/attachment.bin>

More information about the Newlib mailing list