Re: pointers to variables

new topic     » goto parent     » topic index » view thread      » older message » newer message
bernie said...

Nick:

I am afraid that I can't comment on your code because
I am not much of a mathematician or expert in complex math.

Sorry for the poor example. I simply wanted to draw attention to the parse() method which compiles high-level expressions like "a = b * c" into corresponding FPU opcodes to be embedded directly into any assembler. The expression evaluator is complete and has more basic math functions than Euphoria itself (like sgn(), atan2(x,x) and more) but only handles simple variables and has no statements of any kind. It is currently just an interface to simplify FPU programming.

bernie said...

I took a look your fastfill in the archive and complex math in
the archive.

Ugh. I was young and foolish then. Pay no regard to the man behind the curtain.

bernie said...

As you look at my code; keep in mind the routines are compile as
you declare and define them. You do not have to think about
poking stuff into the sequence. You just have to pass the parameters to the routine.

I see this. In fact this feature will probably be quite useful to me.

bernie said...

If you have three parameters:

function foo(atom parm1, atom parm2, atom parm3) 
 
You accesss them in your Asm code in the function like this: 
Asm("foo_", 
"mov eax, [ebp+08] "& -- param3  
"mov ebx, [ebp+12] "& -- param2  
"mov ecx, [ebp+16] "& -- param1  

Very good. These base pointer offsets will end up hidden in my compiler's symbol table never to be seen again smile.

Now the questions - Does it support SSE4? what are the maximum number of args? are the base pointer offsets data dependent? are they always the same for the corresponding parameter? (I expect yes) The method you use for returning objects is not clear to me. Could you please elaborate?

Thanks Bernie.

Nick

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu