6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Tue Nov 12, 2024 3:29 pm

All times are UTC




Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Fri Dec 31, 2010 7:43 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10977
Location: England
I can't find it now, but I've read a comment to the effect that Inmos' OCCAM compiler would sometimes not manage to converge: every pass changed the lengths of the machine code and therefore the branches. Transputer machine code has an interesting construction.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Dec 31, 2010 8:45 pm 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
As I understand it, individual Transputers are just a typical Von Neumann stack machines with instructions for serial I/O. The only oddity I can think of for them is how they construct immediate literals. However, anything beyond 8 literal instructions in a row should overflow a 32-bit Transputer's capacity to hold the number. That should set some kind of limit on code size.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Dec 31, 2010 9:00 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10977
Location: England
yes, but you can imagine even passes bumping up the length by one byte, and odd passes bumping it back down again, such that neither pass is self-consistent and the process can't converge.

(in fact, the machine code is somewhat word-width neutral - same coding for the earlier 16-bit and the later 32-bit models. Each byte in the instruction stream is a pair of nibbles, which constructs the actual opcode in a word-sized buffer. You could, I think, have an instruction stream which constructs a 128-bit constant using lots of PFIX nibbles, and that would be valid (accepted) on any machine, although the machine would doubtless truncate the constant. See http://en.wikipedia.org/wiki/Transputer#Instruction_set)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Dec 31, 2010 10:10 pm 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
Ooooh, yes, good point. I hadn't thought of that kind of interaction before now.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Dec 31, 2010 11:37 pm 
Offline
User avatar

Joined: Tue Mar 02, 2004 8:55 am
Posts: 996
Location: Berkshire, UK
GARTHWILSON wrote:
Quote:
Unfortunately, I have never encountered a triple pass assembler able to resolve forward references in that fashion.

I seem to remember using an assembler that would do as many passes as it took to get rid of all the phase errors.

My assembler normally uses two passes but switches to three when it detects the structured programming (IF/THEN/ELSE, etc.) directives being used so that it can generate the smallest code for the tests (e.g BEQ vs BNE+JMP) and branches (e.g. BRA vs JMP).

_________________
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: John West and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: