65c65
< //Initialize these to 0s
---
> // Initialize these to 0s
70c70,71
< void SparcLiveProcess::handleTrap(int trapNum, ThreadContext *tc)
---
> void
> SparcLiveProcess::handleTrap(int trapNum, ThreadContext *tc)
73,75c74,75
< switch(trapNum)
< {
< case 0x01: //Software breakpoint
---
> switch (trapNum) {
> case 0x01: // Software breakpoint
78c78
< case 0x02: //Division by zero
---
> case 0x02: // Division by zero
81c81
< case 0x03: //Flush window trap
---
> case 0x03: // Flush window trap
84c84
< case 0x04: //Clean windows
---
> case 0x04: // Clean windows
88c88
< case 0x05: //Range check
---
> case 0x05: // Range check
91c91
< case 0x06: //Fix alignment
---
> case 0x06: // Fix alignment
95c95
< case 0x07: //Integer overflow
---
> case 0x07: // Integer overflow
98c98
< case 0x32: //Get integer condition codes
---
> case 0x32: // Get integer condition codes
102c102
< case 0x33: //Set integer condition codes
---
> case 0x33: // Set integer condition codes
117c117
< //From the SPARC ABI
---
> // From the SPARC ABI
119c119
< //Setup default FP state
---
> // Setup default FP state
128,129c128,129
< //No windows contain info from other programs
< //tc->setMiscRegNoEffect(MISCREG_OTHERWIN, 0);
---
> // No windows contain info from other programs
> // tc->setMiscRegNoEffect(MISCREG_OTHERWIN, 0);
131,132c131,132
< //There are no windows to pop
< //tc->setMiscRegNoEffect(MISCREG_CANRESTORE, 0);
---
> // There are no windows to pop
> // tc->setMiscRegNoEffect(MISCREG_CANRESTORE, 0);
134,135c134,135
< //All windows are available to save into
< //tc->setMiscRegNoEffect(MISCREG_CANSAVE, NWindows - 2);
---
> // All windows are available to save into
> // tc->setMiscRegNoEffect(MISCREG_CANSAVE, NWindows - 2);
137,138c137,138
< //All windows are "clean"
< //tc->setMiscRegNoEffect(MISCREG_CLEANWIN, NWindows);
---
> // All windows are "clean"
> // tc->setMiscRegNoEffect(MISCREG_CLEANWIN, NWindows);
140c140
< //Start with register window 0
---
> // Start with register window 0
142,143c142,143
< //Always use spill and fill traps 0
< //tc->setMiscRegNoEffect(MISCREG_WSTATE, 0);
---
> // Always use spill and fill traps 0
> // tc->setMiscRegNoEffect(MISCREG_WSTATE, 0);
145c145
< //Set the trap level to 0
---
> // Set the trap level to 0
147c147
< //Set the ASI register to something fixed
---
> // Set the ASI register to something fixed
153c153
< //Turn on the icache, dcache, dtb translation, and itb translation.
---
> // Turn on the icache, dcache, dtb translation, and itb translation.
163c163
< //The process runs in user mode with 32 bit addresses
---
> // The process runs in user mode with 32 bit addresses
175c175
< //The process runs in user mode
---
> // The process runs in user mode
192c192
< if(argv.size() < 1)
---
> if (argv.size() < 1)
197,198c197,198
< //Even for a 32 bit process, the ABI says we still need to
< //maintain double word alignment of the stack pointer.
---
> // Even for a 32 bit process, the ABI says we still need to
> // maintain double word alignment of the stack pointer.
211,213c211,213
< //This one should technically only be set
< //if there is a cheetah or cheetah_plus tlb,
< //but we'll use it all the time
---
> // This one should technically only be set
> // if there is a cheetah or cheetah_plus tlb,
> // but we'll use it all the time
225,226c225,226
< //Setup the auxilliary vectors. These will already have endian conversion.
< //Auxilliary vectors are loaded only for elf formatted executables.
---
> // Setup the auxilliary vectors. These will already have endian conversion.
> // Auxilliary vectors are loaded only for elf formatted executables.
228,230c228,229
< if(elfObject)
< {
< //Bits which describe the system hardware capabilities
---
> if (elfObject) {
> // Bits which describe the system hardware capabilities
232c231
< //The system page size
---
> // The system page size
234,235c233,234
< //Defined to be 100 in the kernel source.
< //Frequency at which times() increments
---
> // Defined to be 100 in the kernel source.
> // Frequency at which times() increments
244,246c243,245
< //This is the address of the elf "interpreter", It should be set
< //to 0 for regular executables. It should be something else
< //(not sure what) for dynamic libraries.
---
> // This is the address of the elf "interpreter", It should be set
> // to 0 for regular executables. It should be something else
> // (not sure what) for dynamic libraries.
248c247
< //This is hardwired to 0 in the elf loading code in the kernel
---
> // This is hardwired to 0 in the elf loading code in the kernel
250c249
< //The entry point to the program
---
> // The entry point to the program
252c251
< //Different user and group IDs
---
> // Different user and group IDs
257c256
< //Whether to enable "secure mode" in the executable
---
> // Whether to enable "secure mode" in the executable
261c260
< //Figure out how big the initial stack needs to be
---
> // Figure out how big the initial stack needs to be
266,267c265,266
< //This is the name of the file which is present on the initial stack
< //It's purpose is to let the user space linker examine the original file.
---
> // This is the name of the file which is present on the initial stack
> // It's purpose is to let the user space linker examine the original file.
279c278
< //The info_block.
---
> // The info_block.
287c286
< //Each auxilliary vector is two words
---
> // Each auxilliary vector is two words
296c295
< //Figure out the size of the contents of the actual initial frame
---
> // Figure out the size of the contents of the actual initial frame
304,305c303,304
< //There needs to be padding after the auxiliary vector data so that the
< //very bottom of the stack is aligned properly.
---
> // There needs to be padding after the auxiliary vector data so that the
> // very bottom of the stack is aligned properly.
357c356
< //Write out the sentry void *
---
> // Write out the sentry void *
362c361
< //Write the file name
---
> // Write the file name
365,367c364,365
< //Copy the aux stuff
< for(int x = 0; x < auxv.size(); x++)
< {
---
> // Copy the aux stuff
> for (int x = 0; x < auxv.size(); x++) {
374c372
< //Write out the terminating zeroed auxilliary vector
---
> // Write out the terminating zeroed auxilliary vector
386,388c384,386
< //Set up space for the trap handlers into the processes address space.
< //Since the stack grows down and there is reserved address space abov
< //it, we can put stuff above it and stay out of the way.
---
> // Set up space for the trap handlers into the processes address space.
> // Since the stack grows down and there is reserved address space abov
> // it, we can put stuff above it and stay out of the way.
393,396c391,394
< //Set up the thread context to start running the process
< //assert(NumArgumentRegs >= 2);
< //tc->setIntReg(ArgumentReg[0], argc);
< //tc->setIntReg(ArgumentReg[1], argv_array_base);
---
> // Set up the thread context to start running the process
> // assert(NumArgumentRegs >= 2);
> // tc->setIntReg(ArgumentReg[0], argc);
> // tc->setIntReg(ArgumentReg[1], argv_array_base);
405c403
< //Align the "stack_min" to a page boundary.
---
> // Align the "stack_min" to a page boundary.
443,444c441
< while(NWindows - 2 - Cansave != 0)
< {
---
> while (NWindows - 2 - Cansave != 0) {
449c446
< //Do the stores
---
> // Do the stores
470c467,468
< void Sparc64LiveProcess::flushWindows(ThreadContext *tc)
---
> void
> Sparc64LiveProcess::flushWindows(ThreadContext *tc)
478,479c476
< while(NWindows - 2 - Cansave != 0)
< {
---
> while (NWindows - 2 - Cansave != 0) {
484c481
< //Do the stores
---
> // Do the stores
544c541
< //tc->setMiscRegNoEffect(MISCREG_CCR, tc->readMiscRegNoEffect(MISCREG_CCR) & 0xEE);
---
> // tc->setMiscRegNoEffect(MISCREG_CCR, tc->readMiscRegNoEffect(MISCREG_CCR) & 0xEE);
555c552
< //tc->setMiscRegNoEffect(MISCREG_CCR, tc->readMiscRegNoEffect(MISCREG_CCR) | 0x11);
---
> // tc->setMiscRegNoEffect(MISCREG_CCR, tc->readMiscRegNoEffect(MISCREG_CCR) | 0x11);