get_le32 reimplemented in assembly

committer: ml1050 <ml1050> 1143473260 +0000
This commit is contained in:
László Molnár
2006-03-27 15:27:40 +00:00
parent 8773649de6
commit 8142d3474d
3 changed files with 53 additions and 52 deletions
+1 -13
View File
@@ -35,19 +35,7 @@ int thumb_nrv2e_d8(const unsigned char * src, unsigned src_len,
void *LoadLibraryW(const unsigned short *);
void *GetProcAddressA(const void *, const void *);
static void *get_le32(const unsigned char *p)
{
//return (void *) (p[0] + p[1] * 0x100 + p[2] * 0x10000 + p[3] * 0x1000000);
// the code below is 4 bytes shorter than the above when compiled
unsigned ret = 0;
int ic = 3;
do {
ret = ret * 0x100 + p[ic];
} while (--ic >= 0);
return (void *) ret;
}
void *get_le32(const unsigned char *p);
static void handle_imports(const unsigned char *imp, unsigned name_offset,
unsigned iat_offset)