Shop OBEX P1 Docs P2 Docs Learn Events
For Chip Gracey : Thumb PASM on the Prop II — Parallax Forums

For Chip Gracey : Thumb PASM on the Prop II

hippyhippy Posts: 1,981
edited 2008-09-04 00:19 in Propeller 1
Would it be possible to add some support for Thumb-Style PASM for the Propeller Mk II ?

Not extensive support, just an extra barrel shifting extra instruction which would make it much easier and quicker for LMM routines to convert 16-bit Thumb-LMM to 32-bit PASM which would mostly be usable.

Because it's LMM handled there's no need for handling jumps or calls; they can be trapped by the LMM interpreter using opcode "000000" and handled within the LMM kernel.

There would be a lot of expanded-to-PASM opcodes which wouldn't make a lot of sense but it would allow a whole host of those which do and woul make life a lot easier for LMM writers.

While the proposal here uses Cog locations $000-$00F for registers, tie that to the task switching else where and you've got 8 tasks per Cog capable of running Thumb-LMM with very little overhead.

oooooo 0 kkkkkkkkk                    opc   $000,#$kkk
|        |
|        `-----------------.
|_____                     |________
oooooo 0011 1111 000000000 kkkkkkkkk




oooooo 1 r dddd ssss                  opc   $00d,$00s {NR}
|        | |    |
|        | |    `---------------.
|        | `----------.         |
|_____   |            |___      |___
oooooo 11r0 1111 00000dddd 00000ssss



Post Edited (hippy) : 9/3/2008 10:15:59 PM GMT

Comments

  • hippyhippy Posts: 1,981
    edited 2008-09-04 00:19
    I've had a further thought ... by re-arranging the Thumb-style opcodes, WC, WR and conditional bits aren't as much of a problem either. A software lookup on the bottom six bits through a table can XOR with the opcode prior to execution. This would give the full mappability I was reluctant to ask for above the above proposals.

    kkkk kkkk k1oo oooo
    dddd ssss r0oo oooo
    
    



    [noparse][[/noparse]code]
Sign In or Register to comment.