SDKZSPF LSI, SDKZSPF Datasheet - Page 321

no-image

SDKZSPF

Manufacturer Part Number
SDKZSPF
Description
Manufacturer
LSI
Datasheet

Specifications of SDKZSPF

Lead Free Status / Rohs Status
Supplier Unconfirmed
#!/bin/csh -x
# This build script demonstrates how to build the example program.
#
# This example shows the following:
#
#
#
#
#
# -O3 turns on maximum optimizations. zdopt is run on the assembly
# output from compilation to optimize for the G2 architecture.
# -mlong_call is required since we are going to re-locate this func
#
#
#
# -mlarge_data is required since we are going to re-locate the data
#
zdcc -O3 -mlong_call -mlarge_data -c fast_pi.c
# Same as before, except no optimizations, no relocation in-line.
zdcc -c -mlong_call -mlarge_data fast_e.c N_Intrinsic.c
# Optimize the slow pi calculation routine
zdopt -asm slow_pi.s > slow_opt_pi.s
# Assemble the slow version of pi computation.
zdas -o slow_pi.o slow_opt_pi.s
# Assemble ‘foo’ which calls between sections
zdas -o sections.o sections.s
# Now, build an archive library containing the fast versions of the
#
zdar r fast.a fast_pi.o fast_e.o N_Intrinsic.o sections.o
# Multiple steps are done here. main.c is compiled with long calls
#
#
#
#
#
# The resulting executable, pie.exe, can be simulated with zisimg2
#
zdcc -mlong_call -mlarge_data -o pie.exe main.c fast.a slow_pi.o
-Tbss 0x03f000 -Tdata 0x07e700 -Ttext 0x455 -Wl,-M
When the resulting executable is executed using the command:
zisimg2 -exec pie.exe
the following output is produced:
Example Program pie.exe
Copyright © 1999-2003 by LSI Logic Corporation. All rights reserved.
- How to use several compiler switches for zdcc
- How to call assembly from C
- How to re-locate sections of code
- How to build an archive library and link it with a program
- How to optimize assembly code using zdopt
very far from the main function. Also, look in the file at the
in-lined assembly directive changing the relative start of this
file within the text segment.
and bss segments far from the text segment.
objects used for computing pi and e. The library is fast.a.
and large data revferences and linked with the objects created
previously. The bss segment is relocated to address 0x03f000,
the data segment is relocated to address 0x07e700, and the text
segment (code) is relocated to 0x455. A map file is also
produced and printed on stdout.
or zsimg2.
A-11