Recent

Author Topic: FPC for SPARC v7  (Read 9061 times)

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: FPC for SPARC v7
« Reply #30 on: April 01, 2022, 01:09:09 pm »
@praetor, @MarkMLI - I'm a bit behind on that one. Turned out to be more work than I estimated. All that stuff is deeply burried in my arbitrary precision package. It's a bit more work to bring it to the top, do the necessary re-factoring to specialise to the use case at hand etc. Pls bear with me - I should find the time during weekend.

We, together with the programmers who come after us whose sandals we are not worthy to fasten etc., always appreciate your effort and expertise :-)

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

SymbolicFrank

  • Hero Member
  • *****
  • Posts: 1313
Re: FPC for SPARC v7
« Reply #31 on: April 01, 2022, 01:33:09 pm »
That's fine because I'm really enjoying this low-level stuff! Y'all are gonna have me writing my own OS in no time
You totally should! It's not that hard unless you want a GUI. A simple command-line OS with a memory manager, task scheduler and drivers (serial and block) is not that much work and a lot of fun :)

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: FPC for SPARC v7
« Reply #32 on: April 01, 2022, 02:04:27 pm »
BTDT: x86 bare-metal protected mode in Modula-2. Which has left me with the strong belief that most people who complain about the architecture don't realise that they're barking up the wrong tree.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

SymbolicFrank

  • Hero Member
  • *****
  • Posts: 1313
Re: FPC for SPARC v7
« Reply #33 on: April 01, 2022, 02:20:17 pm »
A GUI isn't that hard, either, but a lot of work that isn't programming.

praetor

  • New Member
  • *
  • Posts: 15
Re: FPC for SPARC v7
« Reply #34 on: April 01, 2022, 07:13:18 pm »
That's fine because I'm really enjoying this low-level stuff! Y'all are gonna have me writing my own OS in no time
You totally should! It's not that hard unless you want a GUI. A simple command-line OS with a memory manager, task scheduler and drivers (serial and block) is not that much work and a lot of fun :)

Once I'm a little bit better at assembler, and I've already got Pascal down pat from my high school studies and re-learning it, I probably will give it a go.

Like I said, I have pretty bad anxiety, and at night I'll read documentation on one instruction. It's kinda like reading a passage from the Bible or a Buddhist koan - only significantly more interesting and practical :p Just a nibble that's part of the bigger picture. Assembler kinda forces you to slow down and enjoy the walk. It's cathartic. So I definately see myself rolling my own OS for funsies :D

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: FPC for SPARC v7
« Reply #35 on: April 01, 2022, 07:45:19 pm »
Strictly speaking, you don't need to know assembler to do an OS. You do need to have a good grasp of how to switch that architecture's process and memory state, and how to drive development and debugging tools... which these days are almost always oriented towards high-level code.

It's certainly useful to know, in the same way that watching the classical video showing a French chap making a valve (tube if you're American) from scratch is useful for anybody studying electronics or knowing what microcode is is useful for a CS student who'll almost certainly never work at that level.

When I did the stuff I mentioned earlier the only assembler I had to do was a very simple change to the startup code that came with the language. Apart from that most of the magic was in a tool that laid out data structures in memory.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

praetor

  • New Member
  • *
  • Posts: 15
Re: FPC for SPARC v7
« Reply #36 on: April 01, 2022, 09:22:37 pm »
Oh, that's good to know! :D Maybe I'll work on that after I finish porting FPC to Solaris and IRIX :)

PierceNg

  • Sr. Member
  • ****
  • Posts: 369
    • SamadhiWeb
Re: FPC for SPARC v7
« Reply #37 on: April 02, 2022, 02:35:14 am »
I'd add https://www.chrisfenton.com/homebrew-cray-1a/ for general interest, which is where I first saw mention of this style of refinement.

The chap does some interesting stuff, and it was interesting to see his opinion of Turbo Pascal http://www.chrisfenton.com/dd9-kaypro-edition/ It was even more interesting to see him build a custom system for it using a massive FPGA junked from work http://www.chrisfenton.com/the-zedripper-part-1/

MarkMLl

Good stuff! Thanks for sharing.

MathMan

  • Sr. Member
  • ****
  • Posts: 325
Re: FPC for SPARC v7
« Reply #38 on: April 04, 2022, 11:14:05 am »
@praetor, @MarkMLI

So here we go ;-) Attached is what I can donate

- an implementation of unsigned div and mod for 128 by 64 and 64 by 64 bit
- functional interface with a layout that allows simple enhancement with assembler
- one demo implementation for CoreI 2xxx (Nehalem) is included
- a unit test
- a small benchmark utility, that can measure on cycle count basis under x86-64

What you don't get (sorry)

- full signed integer support <= but that should be rather trivial to implement
- an implementation optimised for 32 bit systems <= but I can help generating that too
- tested & benched under Solaris (SPARC) <= I simply don't have access, so you may need to fiddle with the unit test & bench utility

On my Nehalem system the DivMod 128 by 64 takes ~90 clock cycles (pure pascal), while the asm div instruction takes ~100! Of course this will vary with core used.

Any questions/feedback, pls let me know.

Regards,
MathMan

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: FPC for SPARC v7
« Reply #39 on: April 04, 2022, 11:32:00 am »
That's hardly the first time that I've heard of carefully-implemented code- implemented with the benefit of techniques that improve with time- being faster than the original hardware implementation :-)

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

MathMan

  • Sr. Member
  • ****
  • Posts: 325
Re: FPC for SPARC v7
« Reply #40 on: April 04, 2022, 11:52:51 am »
That's hardly the first time that I've heard of carefully-implemented code- implemented with the benefit of techniques that improve with time- being faster than the original hardware implementation :-)

MarkMLl

Hm, the above plus your last comment (which I had a hard time to decrypt as non-native speaker) makes me wonder - did I come across braggy and you're trying to tease me?

Cheers,
MathMan

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: FPC for SPARC v7
« Reply #41 on: April 04, 2022, 12:07:00 pm »
Hm, the above plus your last comment (which I had a hard time to decrypt as non-native speaker) makes me wonder - did I come across braggy and you're trying to tease me?

Absolutely not, I don't do that sort of thing to people **

I was specifically thinking of one of the VAX opcodes or addressing modes, which was (eventually) reviled for its inefficiency.

The emphasis there being on /eventually/, since it no doubt appeared to be a good idea and competent implementation when first proposed.

So by now, people know quite a lot more about division algorithms than they did when Sun4 came out in the late 80s.

MarkMLl

** Although duffers who consistently offer bad advice are sometimes fair game, provided that it can be done without adding to the confusion of an inexperienced user.
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

MathMan

  • Sr. Member
  • ****
  • Posts: 325
Re: FPC for SPARC v7
« Reply #42 on: April 04, 2022, 12:29:08 pm »
Absolutely not, I don't do that sort of thing to people

I was specifically thinking of one of the VAX opcodes or addressing modes, which was (eventually) reviled for its inefficiency.

The emphasis there being on /eventually/, since it no doubt appeared to be a good idea and competent implementation when first proposed.

So by now, people know quite a lot more about division algorithms than they did when Sun4 came out in the late 80s.

Thanks for stabilising my shakiness :) I think one would not be too far off extending your statement about division algorithms to algorithms in general ...

MathMan

praetor

  • New Member
  • *
  • Posts: 15
Re: FPC for SPARC v7
« Reply #43 on: April 05, 2022, 04:19:47 am »
@MathMan anything you can provide is greatly appreciated! :D

VK2FVAX

  • Newbie
  • Posts: 4
Re: FPC for SPARC v7
« Reply #44 on: July 12, 2022, 07:32:29 am »

I'd be very interested in testing this on some of my gear.

SPARCv7 is pretty basic, no multiply or divide without roll instructions.

Is there a basics guide to how to compile FPC? Newbie introduction?

P.S. I also have HP9000 and IRIX systems running.

 

TinyPortal © 2005-2018