Waldek Hebisch wrote:
I just noticed that hammer backend can not pass Pascal sets as arguments to functions (procedures). The problem should be easy to solve, but first somebody must decide how sets should be treated on hammer. Currently frontend treats sets as a sequence of longs, that should work, but on hammer SSE2 instructions would double efficiency for moderate and large sets. So the question is if we should just teach backend about our current strategy or should we try something more fancy?
If someone wants to optimize things using these special instructions, that can always be done (though it might be quite some work, since probably all of the routines in rts/sets.pas and the corresponding compiler support will have to be rewritten).
However, as you say, the current mechanism treats them as arrays of unsigned long (in C terms), so it should also work. (There's not so much special about it.) I don't know how it fails, but it might be a more general problem.
Frank