S5U1C17001C ManUal
EPSOn
4-9
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
4 SOUrCE filES
4
SrcFiles
4.3.2 notations of Operands
This section explains the notations for the register names, symbols, and constants that are used in the operands of
instructions.
(1) register names
The names of the internal registers of the S1C17 Core all contain a percentage symbol (%). Register names
may be written in either uppercase or lowercase letters.
general-purpose register (%rd, %rs, %rb)
notation
General-purpose register R0–R7
%r0–%r7
or
%R0–%R7
Special register
notation
Stack pointer SP
%sp
or
%SP
Program counter PC
%pc
or
%PC
Register names placed in brackets (
[]
) for indirect addressing must include the
%
symbol.
Examples:
[%r7] [%r1]+ [%sp+imm7]
note
: A register name not containing % will be regarded as a symbol.
Conversely, all notations beginning with % will be regarded as registers, and will give rise to an
error if it is not a register name.
(2) numerical notations
The
as
assembler supports three kinds of numerical notations: decimal, hexadecimal and binary.
Decimal notations of values
Notations represented with 0–9 only will be regarded as decimal numbers. To specify a negative value, put
a minus sign (-) before the value.
Examples:
1 255 -3
Characters other than 0–9 and the sign (-) cannot be used.
Hexadecimal notations of values
To specify a hexadecimal number, place "0x" before the value.
Examples:
0x1a 0xff00
"0x" cannot be followed by characters other than 0–9, a–f, and A–F.
Binary notations of values
To specify a binary number, place "0b" before the value.
Examples:
0b1001 0b01001100
"0b" cannot be followed by characters other than 0 or 1.
Specified ranges of values
The size (specified range) of immediate data varies with each instruction.
The specifiable ranges of different immediate data are given below.
Table 4.3.2.1 Types of immediate data and their specifiable ranges
Symbol
Type
Decimal
Hexadecimal
Binary
imm3
3-bit immediate data
0 to 7
0x0 to 0x7
0b0 to 0b111
imm5
5-bit immediate data
0 to 31
0x0 to 0x1f
0b0 to 0b1 1111
imm7
7-bit immediate data
0 to 127
0x0 to 0x7f
0b0 to 0b111 1111
sign7
Signed 7-bit immediate data
-64 to 63
0x0 to 0x7f
0b0 to 0b111 1111
sign8
Signed 8-bit immediate data
-128 to 127
0x0 to 0xff
0b0 to 0b1111 1111
sign10 Signed 10-bit immediate data -512 to 511
0x0 to 0x3ff
0b0 to 0b11 1111 1111
imm13 13-bit immediate data
0 to 8,191
0x0 to 0x1fff
0b0 to 0b1 1111 1111 1111
imm16 16-bit immediate data
0 to 65,535
0x0 to 0xffff
0b0 to 0b1111 1111 1111 1111
sign16 Signed 16-bit immediate data -32,768 to 32,767
0x0 to 0xffff
0b0 to 0b1111 1111 1111 1111
imm20 20-bit immediate data
0 to 1,048,575
0x0 to 0xfffff
0b0 to 0b1111 1111 1111 1111 1111
sign21 Signed 21-bit immediate data -1,048,576 to 1,048,575 0x0 to 0x1fffff 0b0 to 0b1 1111 1111 1111 1111 1111
sign23 Signed 23-bit immediate data -4194304 to 4194303
0x0 to 0x7fffff 0b0 to 0b111 1111 1111 1111 1111 1111
imm24 24-bit immediate data
0 to 16,777,215
0x0 to 0xffffff
0b0 to 0b1111 1111 1111 1111 1111 1111
sign24 Signed 24-bit immediate data -8,388,608 to 8,388,607 0x0 to 0xffffff
0b0 to 0b1111 1111 1111 1111 1111 1111
Summary of Contents for S5U1C17001C
Page 6: ......
Page 17: ...1 General S5U1C17001C Manual 1 General ...
Page 18: ......
Page 21: ...1 2 Install S5U1C17001C Manual 2 Installation ...
Page 22: ......
Page 29: ...3 SoftDev S5U1C17001C Manual 3 Software Development Procedures ...
Page 30: ......
Page 103: ...4 SrcFiles S5U1C17001C Manual 4 Source files ...
Page 104: ......
Page 121: ...5 IDE S5U1C17001C Manual 5 gnU17 iDE ...
Page 122: ......
Page 365: ...6 Compiler S5U1C17001C Manual 6 C Compiler ...
Page 366: ......
Page 385: ...7 Library S5U1C17001C Manual 7 library ...
Page 386: ......
Page 405: ...8 Assemblr S5U1C17001C Manual 8 assembler ...
Page 406: ......
Page 439: ...9 Linker S5U1C17001C Manual 9 linker ...
Page 440: ......
Page 449: ...10 Debugger S5U1C17001C Manual 10 Debugger ...
Page 450: ......
Page 626: ...11 Tools S5U1C17001C Manual 11 Other Tools ...
Page 627: ......
Page 696: ...S1C17 Family C Compiler Package Quick Reference Reference ...