comp.lang.ada
 help / color / mirror / Atom feed
* VxWorks: Link problem
@ 2002-02-01 11:35 Petter Fryklund
  2002-02-01 16:37 ` Ted Dennison
  0 siblings, 1 reply; 2+ messages in thread
From: Petter Fryklund @ 2002-02-01 11:35 UTC (permalink / raw)


I get undefined reference for high123 and low123 when trying to make
VwWorks_rom including this little neat machine code: (AdaMULTI builds OK!)

with Machine_Code;
procedure rdtsc (High, Low : out Interfaces.Unsigned_32) is

   high123 : Interfaces.Unsigned_32;
   low123  : Interfaces.Unsigned_32;
   pragma Export (C, High123, "high123");
   pragma Export (C, Low123, "low123");


   procedure Do_Inline_Code is
      use Machine_Code;
   begin
      asm'(inst => "rdtsc                            ");
      asm'(inst => "movl    %eax,high123             ");
      asm'(inst => "movl    %edx,low123              ");
   end Do_Inline_Code;

begin
   Do_Inline_Code;
   High := High123;
   Low  := Low123;
end Rdtsc;

(This is done in order to get 64 bit tick counter.) Any suggestions.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-02-01 16:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-01 11:35 VxWorks: Link problem Petter Fryklund
2002-02-01 16:37 ` Ted Dennison

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox