02.03.2014 Views

vxworks programmer's guide.pdf - DAQ Plone Site

vxworks programmer's guide.pdf - DAQ Plone Site

vxworks programmer's guide.pdf - DAQ Plone Site

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

E<br />

MIPS R3000, R4000, R4650<br />

E.4 Architecture Considerations<br />

This section describes the following characteristics of the MIPS architecture that<br />

you should keep in mind as you write a VxWorks application:<br />

■<br />

■<br />

■<br />

■<br />

■<br />

■<br />

■<br />

Gprel addressing<br />

Reserved registers<br />

Floating-point support<br />

Interrupts<br />

Virtual memory mapping<br />

64-bit support<br />

Memory layout<br />

Gprel Addressing<br />

The VxWorks kernel uses gprel (gp-relative) addressing. However, the VxWorks<br />

module loader cannot dynamically load tasks that use gprel addressing.<br />

To keep the loader from returning an error, compile application tasks with the -G 0<br />

option. This option tells the compiler not to use the global pointer.<br />

E<br />

Reserved Registers<br />

Registers k0 and k1 are reserved for VxWorks kernel use, following standard MIPS<br />

usage. The gp register is also reserved for the VxWorks kernel, because only the<br />

kernel uses gprel addressing, as discussed in above. Avoid using these registers in<br />

your applications.<br />

Floating-Point Support<br />

R4650<br />

For the R4650, single precision hardware floating-point support is included by<br />

INCLUDE_HW_FP (which is included by default in the project facility VxWorks<br />

view). Double precision floating-point support is provided by software emulation<br />

when you use -msoft-float. (Note that INCLUDE_SW_FP is not required with<br />

-msoft-float for the R4650.)<br />

485

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!