Shop OBEX P1 Docs P2 Docs Learn Events
Spin Compiler Test File — Parallax Forums

Spin Compiler Test File

BatangBatang Posts: 234
edited 2013-05-25 00:38 in Propeller 1
Hi Guys,

Was there posted anywhere a spin test file to put a spin compiler through its paces so to speak?

If so can I get a link for it, if not does anyone have one that they could post.

Thanks in advance.

Comments

  • David BetzDavid Betz Posts: 14,516
    edited 2013-05-24 09:02
    Batang wrote: »
    Hi Guys,

    Was there posted anywhere a spin test file to put a spin compiler through its paces so to speak?

    If so can I get a link for it, if not does anyone have one that they could post.

    Thanks in advance.
    This is an intriguing question! :-)
    I wonder if this implies that you are working on your own Spin compiler?
  • Heater.Heater. Posts: 21,230
    edited 2013-05-24 09:05
    BradC used the OBEX for his test cases.
  • BatangBatang Posts: 234
    edited 2013-05-24 09:11
    @ Heater: I kinda assumed that there was one for the C++ port by parallax to qualified it.

    @ David: Mulling it over.
  • Heater.Heater. Posts: 21,230
    edited 2013-05-24 09:55
    Wait a minute. What do yo want to test? A Spin compiler or a C/C++ compiler.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-05-24 09:57
    Heater. wrote: »
    Wait a minute. What do yo want to test? A Spin compiler or a C/C++ compiler.
    I think he's asking for the test code used to validate Roy's C++ translation of Chip's Spin compiler.
  • Heater.Heater. Posts: 21,230
    edited 2013-05-24 10:02
    Isn't that OBEX as well?
  • David BetzDavid Betz Posts: 14,516
    edited 2013-05-24 10:05
    Heater. wrote: »
    Isn't that OBEX as well?
    Probably. (or as jazzed' would say, "propably")
  • BatangBatang Posts: 234
    edited 2013-05-24 10:15
    I think he's asking for the test code used to validate Roy's C++ translation of Chip's Spin compiler.

    Yep.
    Isn't that OBEX as well?

    That was my first thought, but which catagory?

    Data Storage Display Fun Human Input Math Motor Control Protocol Sensor Signals Speech/Sound Tool

    I tried TOOL but did not see anything there, did try a few searches but came up empty.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-05-24 10:19
    Batang wrote: »
    Yep.



    That was my first thought, but which catagory?

    Data Storage Display Fun Human Input Math Motor Control Protocol Sensor Signals Speech/Sound Tool

    I tried TOOL but did not see anything there, did try a few searches but came up empty.
    When Heater says "the OBEX" I think he means that the entire OBEX contains code that can be used to validate a Spin compiler. Roy may have had an easier time than you'll have since he was trying to be bit-accurate to Chip's compiler so all he had to do was compile an object with both compilers and compare the resulting binary. If you're going to use a different target VM with your compiler you won't be able to use that approach. Do you intend to target the VM that is in the Propeller 1 ROM?
  • Roy ElthamRoy Eltham Posts: 3,000
    edited 2013-05-25 00:32
    Phil Pilgrim wrote a tool that would pass spin files through propellant and OpenSpin and compare the results. We ran the entire OBEX through the compiler, plus a bunch of other random files Phil Pilgrim had of his own.
    The only binary differences that remain as of now is related to the floating point stuff. Chip's hand written floating point code is not IEEE compliant, but we decided to use C/C++'s built in floating point handling which is.

    I have a project I'm working on with Jeff Martin that is in progress for Parallax that is a Spin compiler validation tool. It will run a bunch of tests on the compiler to verify success and failure cases. It's moved down in priority behind some other things, but I should be back on it next month.

    Roy
  • BatangBatang Posts: 234
    edited 2013-05-25 00:38
    Hi Roy,

    Thanks for the info.

    Cheers
Sign In or Register to comment.