Mercurial > pub > dyncall > dyncall
changeset 97:d0787f3b81fb
- internal linkage for some helper functions
- corrected and added some comments for clarification
author | cslag |
---|---|
date | Sat, 04 Jun 2016 19:35:58 +0200 |
parents | 95f67e67feb0 |
children | db0b2f19e165 |
files | dyncallback/dyncall_callback_x86.S dyncallback/dyncall_thunk_mips.c dyncallback/dyncall_thunk_mips.h dyncallback/dyncall_thunk_ppc32.c dyncallback/dyncall_thunk_ppc32_sysv.c |
diffstat | 5 files changed, 10 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/dyncallback/dyncall_callback_x86.S Sat Jun 04 19:32:21 2016 +0200 +++ b/dyncallback/dyncall_callback_x86.S Sat Jun 04 19:35:58 2016 +0200 @@ -91,7 +91,7 @@ CMP(LIT(ASCII_d),AL) JE(LOCAL(return_f64)) - /* All int cases <= 32 bits (+ pointer & string cases) fall in the 32 bits int case*/ + /* All int cases (+ pointer & string cases) fall in the return_i64 case, here */ LOCAL(return_i64): MOVL(DWORD(EDX,0),EAX) MOVL(DWORD(EDX,4),EDX)
--- a/dyncallback/dyncall_thunk_mips.c Sat Jun 04 19:32:21 2016 +0200 +++ b/dyncallback/dyncall_thunk_mips.c Sat Jun 04 19:35:58 2016 +0200 @@ -25,8 +25,8 @@ #include "dyncall_thunk.h" -unsigned short hi16(x) { return ( (unsigned short) (((unsigned int)x)>>16UL) ); } -unsigned short lo16(x) { return ( (unsigned short) ((unsigned int)x) ); } +static unsigned short hi16(x) { return ( (unsigned short) (((unsigned int)x)>>16UL) ); } +static unsigned short lo16(x) { return ( (unsigned short) ((unsigned int)x) ); } void dcbInitThunk(DCThunk* p, void (*entry)()) { @@ -43,7 +43,7 @@ lui $t9, %hi(entry) ori $t9, $t9, %lo(entry) jr $t9 - ori $t4, $t4, %lo(p) + ori $t4, $t4, %lo(p) ; branch delay slot thunk.o: file format elf32-tradbigmips
--- a/dyncallback/dyncall_thunk_mips.h Sat Jun 04 19:32:21 2016 +0200 +++ b/dyncallback/dyncall_thunk_mips.h Sat Jun 04 19:35:58 2016 +0200 @@ -34,5 +34,7 @@ unsigned short bddt[2]; }; +#define DCTHUNK_MIPS_SIZE 20 + #endif /* DYNCALL_THUNK_MIPS_H */
--- a/dyncallback/dyncall_thunk_ppc32.c Sat Jun 04 19:32:21 2016 +0200 +++ b/dyncallback/dyncall_thunk_ppc32.c Sat Jun 04 19:35:58 2016 +0200 @@ -26,8 +26,8 @@ #include "dyncall_thunk.h" -unsigned short hi16(x) { return ( (unsigned short) (((unsigned int)x)>>16UL) ); } -unsigned short lo16(x) { return ( (unsigned short) ((unsigned int)x) ); } +static unsigned short hi16(x) { return ( (unsigned short) (((unsigned int)x)>>16UL) ); } +static unsigned short lo16(x) { return ( (unsigned short) ((unsigned int)x) ); } void dcbInitThunk(DCThunk* p, void (*entry)()) {
--- a/dyncallback/dyncall_thunk_ppc32_sysv.c Sat Jun 04 19:32:21 2016 +0200 +++ b/dyncallback/dyncall_thunk_ppc32_sysv.c Sat Jun 04 19:35:58 2016 +0200 @@ -25,8 +25,8 @@ #include "dyncall_thunk.h" -unsigned short hi16(x) { return ( (unsigned short) (((unsigned int)x)>>16UL) ); } -unsigned short lo16(x) { return ( (unsigned short) ((unsigned int)x) ); } +static unsigned short hi16(x) { return ( (unsigned short) (((unsigned int)x)>>16UL) ); } +static unsigned short lo16(x) { return ( (unsigned short) ((unsigned int)x) ); } void dcbInitThunk(DCThunk* p, void (*entry)()) {