Skip to content

68040 and 68060 do not implement all 68881/68882 instructions in hardware #13

@dplanitzer

Description

@dplanitzer

These CPUs do not implement the full FP instruction set in hardware and some instructions (e.g. sin, cos, tan, etc) need to be emulated in (kernel) software.

Motorola made two software packages available for these CPUs back in the day: 68040FPSP and 68060SP. We'll need to track them down and somehow integrate them with the system. One thing to keep in mind is that at least the 68060SP was pretty big with about 60k overall. This makes me reluctant to add them to the kernel.

One solution could be to introduce a cpu driver which would support loading a software package at runtime. The storage for it would be dynamically allocated and the required SP would only be installed if actually needed. E.g. systemd could trigger this loading process.

Note that this is not about adding general FP software emulation for CPUs that lack a FPU altogether like the 68020/68030 without a 68881/68882 co-processor installed or the 68LC040. This is about making sure that we can support the full instruction set that is documented in the 68040 and 68060 manuals despite the fact that these chips require software support to achieve this goal.

Anyway, the next step is to track down the 68040FPSP and/or the 68060SP. The 68040FPSP should be pretty much a subset of the 68060SP.

References

MC68040UM, p9-7 (258) for a list of data formats that need to be emulated in software
MC68040UM, p9-21 (272) for a list of instructions that need to be emulated in software
MC68060UM, pC-1 (362) for a description of the 68060SP

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions