Remove trailing whitespace in plat/osx*

Also fix a comment.
This commit is contained in:
George Koehler 2016-11-08 15:22:09 -05:00
parent cd3cf5b10f
commit 7f94e971fd
4 changed files with 18 additions and 18 deletions

View file

@ -115,13 +115,13 @@ uint32_t align(uint32_t a, uint32_t b)
a += b - 1; a += b - 1;
return a & ~(b-1); return a & ~(b-1);
} }
/* Writes out a 32-bit value in the appropriate endianness. */ /* Writes out a 32-bit value in the appropriate endianness. */
void emit32(uint32_t value) void emit32(uint32_t value)
{ {
unsigned char buffer[4]; unsigned char buffer[4];
if (bigendian) if (bigendian)
{ {
buffer[0] = (value >> 24) & 0xFF; buffer[0] = (value >> 24) & 0xFF;
@ -136,7 +136,7 @@ void emit32(uint32_t value)
buffer[1] = (value >> 8) & 0xFF; buffer[1] = (value >> 8) & 0xFF;
buffer[0] = (value >> 0) & 0xFF; buffer[0] = (value >> 0) & 0xFF;
} }
writef(buffer, 1, sizeof(buffer)); writef(buffer, 1, sizeof(buffer));
} }
@ -177,7 +177,7 @@ void emit_lc_segment(char *name, uint32_t vm_ad, uint32_t vm_sz,
{ {
char namebuf[16]; char namebuf[16];
int flags, maxprot; int flags, maxprot;
if (prot == VM_PROT_NONE) { if (prot == VM_PROT_NONE) {
/* special values for __PAGEZERO */ /* special values for __PAGEZERO */
maxprot = VM_PROT_NONE; maxprot = VM_PROT_NONE;
@ -247,7 +247,7 @@ int main(int argc, char *argv[])
/* General housecleaning and setup. */ /* General housecleaning and setup. */
output = stdout; output = stdout;
program = argv[0]; program = argv[0];
/* Read in and process any flags. */ /* Read in and process any flags. */
while ((argc > 1) && (argv[1][0] == '-')) { while ((argc > 1) && (argv[1][0] == '-')) {
switch (argv[1][1]) { switch (argv[1][1]) {

View file

@ -8,7 +8,7 @@
/* We're providing a time() system call rather than wanting a wrapper around /* We're providing a time() system call rather than wanting a wrapper around
* gettimeofday() in the libc. */ * gettimeofday() in the libc. */
/* #define ACKCONF_TIME_IS_A_SYSCALL */ /* #define ACKCONF_TIME_IS_A_SYSCALL */
#endif #endif

View file

@ -26,28 +26,28 @@ begtext:
! sp+8 argc ! sp+8 argc
! sp+4 argv ! sp+4 argv
! sp env ! sp env
mov eax, (esp) ! eax = argc mov eax, (esp) ! eax = argc
lea ebx, 4(esp) ! ebx = argv lea ebx, 4(esp) ! ebx = argv
lea ecx, (esp)(eax*4) lea ecx, (esp)(eax*4)
add ecx, 12 ! environ add ecx, 12 ! environ
push ecx ! environ push ecx ! environ
push ebx ! argc push ebx ! argc
push eax ! argv push eax ! argv
push eax ! dummy, representing the return argument push eax ! dummy, representing the return argument
xor ebp, ebp xor ebp, ebp
jmp __m_a_i_n jmp __m_a_i_n
! This provides an emergency exit routine used by EM. ! This provides an emergency exit routine used by EM.
.define EXIT .define EXIT
.extern EXIT .extern EXIT
EXIT: EXIT:
push 1 push 1
jmp __exit jmp __exit
.sect rom .sect rom
begrom: begrom:
@ -66,4 +66,4 @@ begbss:
.define .trppc, .ignmask .define .trppc, .ignmask
.comm .trppc, 4 ! ptr to user trap handler .comm .trppc, 4 ! ptr to user trap handler
.comm .ignmask, 4 ! user trap ignore mask .comm .ignmask, 4 ! user trap ignore mask

View file

@ -1,4 +1,4 @@
! boot.s for osx386 ! boot.s for osxppc
! Declare segments (the order is important). ! Declare segments (the order is important).
@ -30,13 +30,13 @@ begtext:
lwz r3, 0(sp) ! r3 = argc lwz r3, 0(sp) ! r3 = argc
addi r4, sp, 4 ! r4 = argv addi r4, sp, 4 ! r4 = argv
rlwinm r5, r3, 32-2, 2, 31 ! shift left 2 bits rlwinm r5, r3, 32-2, 2, 31 ! shift left 2 bits
add r5, r5, r4 add r5, r5, r4
addi r5, r5, 8 ! r5 = env addi r5, r5, 8 ! r5 = env
stwu r5, -4(sp) stwu r5, -4(sp)
stwu r4, -4(sp) stwu r4, -4(sp)
stwu r3, -4(sp) stwu r3, -4(sp)
b __m_a_i_n b __m_a_i_n
.sect rom .sect rom
@ -57,4 +57,4 @@ begbss:
.define .trppc, .ignmask .define .trppc, .ignmask
.comm .trppc, 4 ! ptr to user trap handler .comm .trppc, 4 ! ptr to user trap handler
.comm .ignmask, 4 ! user trap ignore mask .comm .ignmask, 4 ! user trap ignore mask