[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [f-cpu] pointer add & sub




> > You could have the following :
> >
> > - add r3,r2,r1 => r1.pointer = r2.pointer XOR r3.pointer
> > - sub r3,r2,r1 => r1.pointer = r3.pointer AND NOT r2.pointer
> >
> > (as for immediates, the obvious convention is imm8.pointer = false)
> >
> > So, unless there are useful exceptions to the above,
> > you can get rid of special "memory pointer" operations.
> 
> In fact a pointer imply a TLB check, so it complicate really a lot the normal 
> adder. In F-CPU it's more logical to add a new instruction that only with 
> memory.

That doesn't mean you need to have two different opcodes !
(by the way, what is the current opcode count ? the max is 256...)
Also, the TLB check is speculative and performed after the addition
so it needn't be in the main execution path, does it ? So I don't  
understand why the adder in itself would be complicated by this.


My feeling was that madd/msub had been added because people
didn't know how to calculate the pointer flag after a normal
arithmetic operation...


*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/