Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

ST20-C1 Datasheet(PDF) 178 Page - STMicroelectronics

Part # ST20-C1
Description  Instruction Set Reference Manual
PDF  205 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

ST20-C1 Datasheet(HTML) 178 Page - STMicroelectronics

Back Button ST20-C1 Datasheet HTML 174Page - STMicroelectronics ST20-C1 Datasheet HTML 175Page - STMicroelectronics ST20-C1 Datasheet HTML 176Page - STMicroelectronics ST20-C1 Datasheet HTML 177Page - STMicroelectronics ST20-C1 Datasheet HTML 178Page - STMicroelectronics ST20-C1 Datasheet HTML 179Page - STMicroelectronics ST20-C1 Datasheet HTML 180Page - STMicroelectronics ST20-C1 Datasheet HTML 181Page - STMicroelectronics ST20-C1 Datasheet HTML 182Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 178 / 205 page
background image
178/205
®
C
Compiling for the ST20-C1
C.1
Generating prefix sequences
Prefixing is intended to be performed by a compiler or assembler. Prefixing b y hand is
not advised.
Normally a value can be loaded into the instruction data value by a variety of different
prefix sequences . It is important to use the shortest possible sequence as this
enhances both code compaction and execution speed. The best method of optimizing
object code so as to minimize the number of prefix instructions needed is shown
below.
C.1.1 Prefixing a constant
The algorithm to generate a constant instruction data value
e for a function op is
described by the following recursive function.
prefix( op , e ) = if (e
< 16 AND e
0)
op( e )
else if
(e
16)
{prefix( pfix, e >> 4 ); op( e
∧ #F )}
else if
(e
< 0)
{prefix( nfix, (~e) >> 4 ); op( e
∧ #F )}
where ( op, e ) is the instruction component with function code op and data
field e , ~ is a bitwise NOT, and >> is a logical right shift.
C.1.2 Evaluating minimal symbol offsets
Several primary instructions have an operand that is an offset between the current
value of the instruction pointer and some other part of the code. Generating the
optimal prefix sequence to create the instruction data value for one of these instruc-
tions is more complicated. This is because two, or more, instructions with offset
operands can interlock so that the minimal prefix sequences for each instruction is
dependent on the prefixing sequences used for the others.
For example consider the interlocking jumps below which can be prefixed in two
distinct ways. The instructions
j and cj are respectively jump and conditional jump.
These are explained in more detail later. The sequence:
cj +16; j -257
can be coded as
pfix 1; cj 0; pfix 1; nfix 0; j 15
but this can be optimized to be
cj 15; nfix 15; j 1
which is the encoding for the sequence
cj +15; j -255



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com