home *** CD-ROM | disk | FTP | other *** search
/ AMIGA PD 1 / AMIGA-PD-1.iso / Programme_zum_Heft / Programmieren / Kurztests / Barfly / Docs / 68060Guide.doc next >
Text File  |  1994-09-28  |  5KB  |  142 lines

  1. ******************************************************************************
  2. *                                                                            *
  3. * 68060 Upgrade Software Guide                                                  *
  4. *                                                                            *
  5. * Copyright Ralph Schmidt                                                    *
  6. *                                                                            *
  7. * Phase5/Advanced Systems&Software                                           *
  8. *                                                                            *
  9. * Rev 2 - Rev 1                                                                      *
  10. *
  11. * Forgot to mention the AFB_68060 Bit
  12. *
  13. * Rev 1
  14. *                                                                            *
  15. *                                                                            *
  16. * EMail: laire@uni-paderborn.de                                              *
  17. *                                                                            *
  18. ******************************************************************************
  19.  
  20. 0) Advanced System & Software will sell the first 060 accelerator,
  21.    namely the Cyberstorm 060, rather soon and wants to achieve a smooth
  22.    integration into the Amiga.
  23.    Therefore we hope that software companys and pd programmers
  24.    will adopt their software to deal with the 68060.
  25.  
  26. 1) 68060 Flag in ExecBase->AttnFlags
  27.  
  28. ;exec/execbase.i
  29.     BITDEF    AF,FPU40,6    ; Set if 68040/68060 FPU
  30.     BITDEF    AF,68060,7    ; Set if 68060
  31.  
  32. ;exec/execbase.h
  33. #define    AFF_68060    (1L<<7)
  34.  
  35.  
  36. 2) Inststructions supported by the 68040 but not by the 68060 directly that
  37.    can hurt performance:
  38.  
  39.  o divx.l (64bit divide)
  40.  o mulx.l (64bit multiply)
  41.  o fdbcc
  42.  o fscc
  43.  o movep
  44.  o There are other instructions that are not supported or have to
  45.    be emulated but these aren't relevant for user applications.
  46.  
  47. 3) Instructions supported by the 68060 in hardware that are emulated on
  48.    the 68040:
  49.  
  50.  o fint
  51.  o fintrz
  52.  
  53. 4) Emulation limitations
  54.  
  55. The emulation can't reliably emulate unsupported instructions
  56. that access the (ssp) in a way that it contradicts the basic
  57. definition of a stack. (ssp)=sp in supervisor mode.
  58. I don't think anybody is using such constructs in his software
  59. but I want to mention it to stop anybody from using these:
  60.  
  61. div{u,s}.l        -(ssp),dr:dq
  62. mul{u,s}.l        -(ssp),dr:dq
  63. f<op>.p            -(ssp),fpn
  64. f<op>.p            fpn,(ssp)+
  65. f<op>.{b,w,l,s,d,x}    -(ssp),fpn
  66. fs<cc>.b        -(ssp)
  67. fmovem.x        -(ssp),dn
  68. fmovem.x        dn,(ssp)+
  69. f<op>.x            fpn,(ssp)+    ;Underflow,SNAN exception
  70. f<op>.{b,w,l}        fpn,(ssp)+    ;Enabled OPERR
  71.  
  72.  
  73.  
  74. 5) Other software problems.
  75.  
  76.   o Don't use Aztec C.
  77.     It is not compatible with the 68060.
  78.     Popular applications with this problem: CED 2.02,CED 3.5,Mand2000D
  79.     *I fixed this by patching Supervisor()*,
  80.     so don't worry about your programs but
  81.     don't use it in future software if possible.
  82.  
  83.     Here's the bad Code:
  84.  
  85.     btst.b    #4,$129(a6)        ;check for 68881 flag in AttnFlags
  86.     beq    1$            ;skip if not
  87.     lea    2$,a5
  88.     jsr    -30(a6)            ;do it in supervisor mode
  89.     bra    1$
  90.     2$
  91.     clr.l    -(sp)
  92.     frestore (sp)+            ;reset the ffp stuff
  93.     ;The 68060 FRestore stackframe is 12 bytes long but it only created
  94.     ;a NULL frame with the size of 4 Bytes so the Stack is wrong afterwards.
  95.     ;RTE->jump into unknown regions...crash
  96.     rte                ;and return
  97.  
  98. 6) New Stackframe format
  99.  
  100.    These informations are only interesting for Debugger programmers
  101.    and kernel hackers.
  102.  
  103.    o 3-Byte in the 1st Longword = 0 then NULL Stackframe.
  104.      xxxx00xx    ;1st Longword of the FPU stackframe
  105.      xxxxxxxx    ;2nd Longword of the FPU stackframe
  106.      xxxxxxxx    ;3rd Longword of the FPU stackframe
  107.      xxxxxxxx    ;PC
  108.      xxxx    ;SR
  109.      d0-a6    ;Registers
  110.  
  111.  
  112.    o 3-Byte in the 1st Longword !=0 then BUSY Stackframe.
  113.      ffffffff    ;Busy Fake Longword
  114.      xxxxxxxx    ;FPCR
  115.      xxxxxxxx    ;FPSR
  116.      xxxxxxxx    ;FPIAR
  117.      fp0-fp7    ;FPU Registers
  118.      xxxxxxxx    ;1st Longword of the FPU stackframe
  119.      xxxxxxxx    ;2nd Longword of the FPU stackframe
  120.      xxxxxxxx    ;3rd Longword of the FPU stackframe
  121.      xxxxxxxx    ;PC
  122.      xxxx    ;SR
  123.      d0-a6    ;Registers   
  124.  
  125.  
  126. 7) MMU Table differences
  127.  
  128.    The 68040 and 68060 mmu tables are almost the same but there is
  129.    an important difference. For the 68060 the MMU-Tables have to
  130.    be placed into non-cached ram!!!!!!!
  131.    So if you manipulate the mmu-table you have to mark the pages
  132.    with your added tables as non-cacheable.
  133.    Another difference is that the Cyberstorm software uses the
  134.    area $ffff8000-$ffffffff for itself.
  135.    You are NOT allowed to change the mmu-table that this area
  136.    is touched in any way. This can lead to serious crashes.
  137.  
  138.  
  139. 8) Barfly 1.09 is the first Assembler/Debugger that supports the
  140.    68060. It can be found on aminet:dev/asm/barfly1_09.lha
  141.  
  142.