![]() Acrobat file (207K) |
![]() ClarisWorks 4 file (48K) |
![]() QuickView file (473K) |
T E C H N O T E :
Understanding Type 11
& No FPU Installed Errors
on the Power Macintosh
TECHNOTE 1011 | OCTOBER 1995 |
By Brian Bechtel
blob@apple.com
Apple Developer Technical Support (DTS)
On a Power Macintosh, No FPU Installed means that some program has jumped to an area of data and has tried to execute any data word starting with the hex value F. The PowerPC chip has floating point support built in, but that floating-point support is different from the Motorola 680x0 family floating- point support. The Motorola 680x0 family uses an external floating-point unit. (There are also external memory management units (MMUs) and other specialized coprocessors.) Motorola 680x0 CPUs use instructions starting with hex value F as instructions for these coprocessors.
MOVE.B D1, D2translates to the hexadecimal value
1401This instruction starts with the hex value 1. The instruction
FMOVE.X FP3,-(A7)translates to
F227 6980This instruction starts with the hex value F.
A program can be compiled to take advantage of the hardware assistance the FPU provides, and thus yield faster floating-point calculations than would be available with SANE (the Standard Apple Numerics Package). Such programs would have instructions in the program which start with the hex value F. A program only using SANE would never have an instruction starting with the hex value F.
The 68040LC is a cost-reduced version of the 68040 chip. Savings came about by removing the FPU portion of the chip. Not only does a 68040LC chip have no FPU, there is no way to add one.
If you install Macsbug 6.5.2 or later, some Type 11 errors may be reported as a PowerPC unmapped memory exception. This is equivalent to a bus error, i.e., an error indicating your program is accessing memory that doesn't exist.
The Modern Memory Manager was designed to be less forgiving than the classic (68K) Memory Manager. Disposing of something twice, disposing of memory that was never allocated, and other memory handling problems will often generate a Type 11 error, while on a 68K machine the problem may go unnoticed.
void IAmGoingToCrash(void)
{
Str27 badArray;
BlockMoveData("\pThis string is too long for this array", badArray, 39);
}
Ptr badPointer = (Ptr)-2;
*badPointer = 0;
A replacement cursor.c file has been provided in the Apple Media Tool/Programming Environment Runtime folder, and we do have a replacement Runtime Maker:Codes:Program file for Apple Media Tool. If you are currently developing titles, replacing these files and rebuilding your projects will remove the bug.
As an extreme example, a faceless background application (documented in Technical Note PS 2) has only a 2K stack by default. A 68K application has 24K of stack on most modern machines (8K if no Color QuickDraw is installed, 32K if A/UX is installed.) You can use the low memory accessor function LMGetDfltStack to find your current stack size. Native QuickDraw has several changes in algorithms that have increased the size of some structures. PowerPC alignment issues may cause the size of data structures to increase. Check your compiler documentation for further details.
To help detect collisions between the stack and the heap, a ``stack sniffer'' VBL task is installed that compares the current ends of the stack and heap and generates a system error 28 in case of a collision. Unfortunately, the Thread Manager is forced to disable the stack sniffer whenever it is installed. (This is because threads can have a stack in places where the stack sniffer doesn't expect them; if the stack sniffer is enabled, it would generate a system error 28.) This means you don't have the same level of protection as you did under older system software versions without the Thread Manager installed.
Return to Technotes Table of Contents
Return to About Macintosh Technotes
Return to Developer Services and Products
Send feedback to devfeedback@applelink.apple.com.