Code style/whitespace cleanup; remove obsolete headers.

And move the MAP_ANON redefinition from py/asmx64.c to unix/alloc.c.
This commit is contained in:
Damien George
2014-09-03 22:47:23 +01:00
parent a669cbc690
commit dda46460ff
6 changed files with 13 additions and 19 deletions

View File

@@ -35,15 +35,8 @@
// wrapper around everything in this file
#if MICROPY_EMIT_X64
#include <sys/types.h>
#include <sys/mman.h>
#include "asmx64.h"
#if defined(__OpenBSD__) || defined(__MACH__)
#define MAP_ANONYMOUS MAP_ANON
#endif
/* all offsets are measured in multiples of 8 bytes */
#define WORD_SIZE (8)
@@ -164,7 +157,7 @@ void asm_x64_start_pass(asm_x64_t *as, uint pass) {
void asm_x64_end_pass(asm_x64_t *as) {
if (as->pass == ASM_X64_PASS_COMPUTE) {
MP_PLAT_ALLOC_EXEC(as->code_offset, (void**) &as->code_base, &as->code_size);
if(as->code_base == NULL) {
if(as->code_base == NULL) {
assert(0);
}
//printf("code_size: %u\n", as->code_size);