Re: turbo pascal question




"Oliver Bleckmann" <Oliver-Bleckmann@xxxxxxxxxx> wrote in message
news:do9i03$ko6$1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
> my brother asked me about this, now I ask you.
> This should work for FreePascal, but not for Borland Pascal 6.0 or 7.0 -
> WHY?

IIRC BP function results were either passed back in registers, an fpu
register, or as a double word stack entry (in the case of strings). While I
haven't found an explicit explanation, I would expect that neither records
or array types could be used as function result types. I wouldn't be
surprised if sets, at least those with a base type of cardinality > 32,
were also disallowed.

> Any suggestions or workarounds?

Add a Var parameter of the appropriate type and turn the function into a
procedure. Or, as another poster suggested return a pointer type.


.



Relevant Pages

  • Re: turbo pascal question
    ... >> my brother asked me about this, ... > IIRC BP function results were either passed back in registers, ... > or array types could be used as function result types. ...
    (comp.lang.pascal.delphi.misc)
  • Re: uncertain: x87 or SSE2
    ... optimizations will take place on the SSE hardware, not the FPU. ... it is not a true register machine (the registers are relative); ... Every stack machine has *some* limitations. ...
    (alt.lang.asm)
  • Re: Whats gonna happen to "extended"?
    ... When implementing Win64, Microsoft decided not to save the FPU & MMX registers across context switches for 64bit programs, which effectively means x87 FPU, MMX and 3DNow! ... There are new x64 instructions planned in the next two years, maybe they'll include the ability to work on 128 bit floats (there already are 128bit float registers in x64... ...
    (borland.public.delphi.non-technical)
  • Re: [PATCH] Mantaining turnstile aligned to 128 bytes in i386 CPUs
    ... AFAIK the only major stopper is context saving of the ... >> than SSE, but overlay FPU registers?) ... > When I implemented fpu copy into the kernel I had a lot of thinking ...
    (freebsd-arch)
  • Re: [PATCH] Mantaining turnstile aligned to 128 bytes in i386 CPUs
    ... AFAIK the only major stopper is context saving of the ... >> than SSE, but overlay FPU registers?) ... > When I implemented fpu copy into the kernel I had a lot of thinking ...
    (freebsd-current)