橡3sec3.PDF

Size: px
Start display at page:

Download "橡3sec3.PDF"

Transcription

1 .

2 200

3 SuperH RISC engine C/C++ 2 SuperH RISC engine C/C++ -speed (1) (2) shc C -code asmcode -cpu=sh2 SH-1 SH-2 SH-2E SH-3 SH-3E SH-4 201

4 3.1 ROM RAM const FSQRT,FABS GBR

5 const ROM/RAM 203

6 ROM SuperH RISC engine int f( void ) char a = 10; int c = 0; for ( ; a > 0; a-- ) c += a; int f( void ) long a = 10; int c = 0; for ( ; a > 0; a-- ) c += a; return(c); return(c); L217: EXTS.B EXTS.B CMP/PL BT #10,R4 #0,R5 R4,R3 R3,R5 #-1,R4 R4,R2 R2 L217 R5,R0 L217: CMP/PL BT #10,R4 #0,R5 R4,R5 #-1,R4 R4 L217 R5,R0 20byte 16byte 88cycle 64cycle 204

7 3.1.2 signed unsigned signed ROM SuperH RISC engine 1 2 unsigned EXTU unsigned signed b a unsigned short a; unsigned short b; int c; void f(void) c = b + a; short a; short b; int c; void f(void) c = b + a; L218:.L.W.L EXTU.W.W EXTU.W.L.L L218+4,R0 R1,R1 R1,R3 L218+8,R1 R3,@R1 _b _a _c L218:.L.W.L.W.L.L R1,R3 L218+8,R1 R3,@R1 _b _a _c 32byte 20cycle 28byte 19cycle 205

8 3.1.3 [unsignedchar [unsignedshort SH-2 SH-2E SH-3 SH-3E SH MULS.W/MULU.W 4 MUL.L SH-1 2 MULS/MULU 4 a b SH-1 int f( long a, long b ) return( a * b ); int f( short a, short b ) return( a * b ); L218: STS.L.L JSR LDS.L PR,@-R15 R4,R1 muli STS.L MULS STS LDS.L MACL,@-R15 R5,R4 20byte 10byte 35cycle 13cycle a=1,b=2 206

9 3.1.4 a, b, c int a, b, c; void f(void) a = 1; b = 2; c = 3; struct s int a; int b; int c; s1; void f(void) register struct s *p=&s1; p->a = 1; p->b = 2; p->c = 3; L218:.L.L.L.L.L.L L218,R2 #2,R1 L218+4,R0 #1,R3 R3,@R2 #3,R3 R1,@R0 L218+8,R1 R3,@R1 _a _b _c L217:.L.L.L.L L217,R4 #1,R3 R3,@R4 #2,R2 R2,@(4,R4) #3,R3 R3,@(8,R4) s1 32byte 20byte 17cycle 15cycle 207

10 3.1.5 RAM 8 char a; int b; short c; char d; char a; char d; short c; int b; a c b d a d b c 208

11 3.1.6 const const ROM RAM RAM const RAM ROM 5 char a[ = 1, 2, 3, 4, 5; const char a[ = 1, 2, 3, 4, 5; ROM RAM ROM 209

12 3.1.7 a. b. c. 10 int i; void f(void) for ( i = 0; i < 10; i++ ); void f(void) int i; for ( i = 0; i < 10; i++ ); L217: L216: L218:.L BRA.L.L.L.L CMP/GE BF.RES.W 1 _i L218+2,R4 #0,R3 #10,R5 L216 #1,R1 R5,R3 L217 L216: DT BF #10,R4 R4 L

13 32byte 129cycle 10byte 47cycle 211

14 3.1.8 a[i a[0 i int f1( int data[, int count ) int ret = 0, i; int f2( int *data, int count ) int ret = 0, i; for (i = 0; i < count; i++) ret += data[i*i; return ret; for (i = 0; i < count; i++) ret += *data++ *i; return ret; _f1: STS.L MACL,@-R15 _f2: STS.L MACL,@-R15 CMP/PL #0,R7 R5 CMP/PL #0,R7 R5 BF/S L219 R7,R6 BF/S L221 R7,R6 L220: R6,R0 SHLL2.L MUL.L R6,R3 #1,R6 MUL.L R6,R3 #1,R6 STS CMP/GE MACL,R3 R5,R6 STS CMP/GE MACL,R3 R5,R6 BF/S L222 R3,R7 BF/S L220 R3,R7 L221: R7,R0 L219: R7,R0 18byte 185cycle 14byte 165cycle count=10 212

15 3.1.9 (1) i (1) (2) int i; void f(void) i = 0x10000; int i; void f(void) i = 0x01; (1) (2) L216:.L.L.L L216,R3 L216+4,R2 R3,@R2 H' _i L216:.L.L L216,R2 #1,R3 R3,@R2 _i (1) (2) 16byte 12byte 11cycle 11cycle 213

16 (2) a #define MASK1 0x1000 #define MASK2 0x10 int a = 0xffffffff; void f(void) int x; x = MASK1; x = MASK2; a &= x; #define MASK1 0x1000 #define MASK2 0x10 int a = 0xffffffff; void f(void) a &= MASK1 MASK2; L217:.W.L.L AND.L L217,R4 R4,R3 R3,@R5.DATA.W.RES.W H' _a L216:.L.W.L AND.L L216+4,R4 R3,R2 R2,@R4.DATA.W.RES.W H' _a 20byte 20byte 15cycle 15cycle 214

17 (1) rc C (1) (2) #define ERR -1 #define NORMAL 0 int f(void) int rc, code; #define ERR -1 #define NORMAL 0 int f(void) int rc, code; rc = 0; code = NORMAL; return( code ); rc = 0; if ( rc ) code = ERR; else code = NORMAL; return( code ); (1) (2) #0,R0 #0,R0 (1) (2) 4byte 4byte 8cycle 8cycle 215

18 (2) a c b C (1) (2) int f(void) int a, b; int f(void) int a, b, c; a = 3; b = 15; return b; a = 3; c = 5; b = c * a; return b; (1) (2) #15,R0 #15,R0 (1) (2) 4byte 4byte 8cycle 8cycle 216

19

20 JSR BSR f g extern g(void); int f(void) g(); int g(void) int f(void) g(); L216:.L JMP.RES.W 1 _g _g: BRA _g 12byte 8byte 16cycle 11cycle BSR BSR BSR 218

21 3.2.2 switch switch case a void f(int a) switch (a) case 0: nop(); break; case 1: case 2: stop(); break; play(); break; static int (*key[3)() = nop, stop, play; void f(int a) (*key[a)(); L220: L221: L222: CMP/EQ BT CMP/EQ BT CMP/EQ BT BRA.L JMP.L JMP.L JMP R4,R0 #0,R0 L220 #1,R0 L221 #2,R0 L222 L223 L221: L216:.L.L SHLL2.L JMP.SECTION L221,R0 #-4,R15 R4,@R15 #4,R15 L216 D,DATA,ALIGN=4 _nop,_stop,_play L223: L224: _nop _stop _play 219

22 52byte 20byte 25cycle 21cycle 220

23 3.2.3 RAM R0 R3 R4 R7 R8 R14 SH-3E,SH-4 FR0 FR3 FR4 FR11 FR12 FR14 f 5 int f(int, int, int, int, int); void g(void) f(1, 2, 3, 4, 5); struct b int a, b, c, d, e; b1 = 1, 2, 3, 4, 5; int f(struct b *p); void g(void) f(&b1); _g: L216: STS.L.L.L JSR LDS.L.RES.W 1 _f PR,@-R15 #5,R3 L216+2,R2 #4,R7 R3,@-R15 #3,R6 #1,R4 _g: L217:.L.L JMP L217,R4 _b1 _f 32byte 16byte 24cycle 14cycle 221

24 3.2.4 funk1( ) funk2( funk3( ) BSR JSR funk3( ) funk3( ) funk2( ) funk2( ) funk1( ) funk2( ) funk3( ) BSR JSR funk3( ) funk3( ) funk1( ) 3.1 f g h g h f f Ver.2.0 Ver.3.0 void f(int x) if (x==1) g(); else h(); void f(int x) if (x==1) g(); else h(); STS.L CMP/EQ BF BRA PR,@-R15 R4,R0 #1,R0 L207 _g CMP/EQ BT BRA R4,R0 #1,R0 _g _h 222

25 L207: LDS.L BRA _ 16byte 10byte 9cycle 6cycle x=2 223

26 3.2.5 FSQRT,FABS sqrt,fabs SH-3E SH-4 FSQRT,FABS fabs FABS <math.h> <mathf.h> #define fabs(a) ((a)>=0?0:(-(a)))/* FABS */ <math.h> FABS -cpu=sh4 fpu=single fabsf() <mathf.h> float a,b; f() : : b=fabs(a); : #include <math.h> float a,b; f() : : b=fabs(a); : STS.L PR,@-R15.L L258,R3.L.L L237+6,R2 L237+2,R3.L F.S FABS FR3 LDS LDS.L L258: F.S FR3,@R2.L FLOAT L237+10,R3 FPUL,FR3 _a _b F.S FR3,@R3 L237:.RES.W 1 _a _fabs _b 224

27 SH-4 36byte 738cycle 20byte 33cycle 225

28 for for switch case ROM ROM

29 3.3.1 a[ b[5 void f(void) int i,j; void f(void) int i,j,t; j = 5; for ( i=0; i < 100; i++) a[i = b[j; j = 5; for ( i=0, t=b[j;i < 100; i++) a[i = t; L219: L220:.L.L.L.L CMP/GE BF/S L220,R4 #100,R6 L220+4,R7 #1,R5 R3,@R4 R6,R5 L219 #4,R4 _a H' _b L220: L221:.L.L.L.L CMP/GE BF/S L221,R7 #100,R6 L221+4,R4 #1,R5 R7,@R4 R6,R5 L220 #4,R4 H' _b _a 32byte 711cycle 32byte 612cycle 227

30 3.3.2 a[ void f(void) int i; void f(void) int i; for ( i = 0; i < 100; i++) a[i = 0; for ( i = 0; i < 100; i+=2) a[i = 0; a[i+1 = 0; L217: L218:.L.L CMP/GE BF/S.RES.W 1 _a L218+2,R4 #0,R6 R6,R5 #100,R7 R6,@R4 #1,R5 R7,R5 L217 #4,R4 L218: L219:.L.L.L CMP/GE BF/S L219,R5 #0,R4 R4,R6 #100,R7 R4,@R5 #2,R6 R4,@(4,R5) R7,R6 L218 #8,R5 _a 28byte 611cycle 28byte 361cycle 228

31 3.3.3 unsigned int a; int f(void) return(a*4); unsigned int b; int f(void) return(b/2); L217:.L.L SHLL2 R0 _a L217:.L.L SHLR R0 _b 229

32 n int f( long n ) int i, s; for (s = 0, i = 1; i <= n; i++) s += i; return( s ); int f( long n ) return( n*(n+1) >> 1 ); L219: L218: CMP/GT BT/S CMP/GT BF #1,R5 R4,R5 L218 #0,R6 R5,R6 #1,R5 R4,R5 L219 R6,R0 STS.L MUL.L STS SHAR LDS.L MACL,@-R15 R4,R0 #1,R0 R4,R0 MACL,R0 20byte 16byte 610cycle 20cycle n=

33 3.3.5 switch switch case i ch char f (int i) char ch; switch (i) case 0: ch = a ; break; case 1: ch = x ; break; case 2: ch = b ; break; return (ch); char chbuf[ = a, x, b ; char f(int i) return (chbuf[i); L218: L219: L220: L221: CMP/EQ BT CMP/EQ BT CMP/EQ BT BRA BRA BRA R4,R0 #0,R0 L218 #1,R0 L219 #2,R0 L220 L221 L221 #97,R4 L221 #120,R4 #98,R4 R4,R0 L218:.L.B 1 _chbuf 231

34 32byte 12byte 18cycle 10cycle i=2 232

35 if 0 1 int f (int x) if ( x >= 1 ) return 1; else return 0; int f (int x) if ( x > 0 ) return 1; else return 0; L216: L217: CMP/GE BF #1,R3 R3,R4 L216 #1,R0 #0,R0 L216: L217: CMP/PL BF R4 L216 #1,R0 #0,R0 16byte 14byte 11cycle 10cycle 233

36 3.3.7 x,y,z FPU P P0,P1,P2 #define SCAL2(v) ((v)->x*(v)->x +(v)->y*(v)->y +(v)->z*(v)->z) #define SubVect(a,b) ((a)->x-=(b)->x, (a)->y -= (b)->y, (a)->z -= (b)->z) typedef struct float x,y,z; POINT3; typedef struct POINT3* v; POLI; int f(point3 *p, POLI *poli, float rad) float dst2; POINT3 dv; dv=poli->v[0; SubVect(&dv,p); dst2=scal2(&dv); if (dst2>rad) return 0; dv=poli->v[1; SubVect(&dv,p); dst2=scal2(&dv); if (dst2>rad) return 0; dv=poli->v[2; SubVect(&dv,p); dst2=scal2(&dv); if (dst2>rad) return 0; float scal2(point3 *p1, POINT3 *q1) float a,b,c; float d,e,f; float *p=(float *)p1,*q=(float *)q1; a=*p++; d=*q++; b=*p++; e=*q++; a-=d; c=*p++; f=*q++; b-=e; c-=f; return a*a+b*b+c*c; int f(point3 *p,poli *poli, float rad) float d; POINT3 *q; q=poli->v; d2=scal2(q++,p); if (d2>rad) return 0; d2=scal2(q++,p); if (d2>rad) return 0; d2=scal2(q++,p); if (d2>rad) return 0; return 1; return 1; 234

37 235.EXPORT _f.section @(8,R3),R1.L R15,R0 R15,R3 R15,R2 FSUB FR3,FR2 F.S #4,R0 R0,R1 R4,R1 FSUB FR3,FR2 F.S #8,R0 R0,R1 R4,R1 R15,R3 R15,R1 FSUB FR3,FR2 F.S R15,R3 R15,R0 #4,R8 R15,R7 R7,R8 R15,R6 #4,R7 R6,R7 FMUL FR0,FR3 #8,R0 FMAC FR0,FR2,FR3 FMAC FR0,FR2,FR3 F.S FR3,FR5 FCMP/GT FR4,FR5 BT R15,R3 #12,R2.EXPORT _scal2.export _f.section P,CODE,ALIGN=32 _scal2: FSUB FR5,FR6 FSUB FR7,FR4 F.S FR6,FR0 FSUB FR8,FR5 F.S FR4,FR3 FMUL FR4,FR3 FMAC FR0,FR6,FR3 F.S FR5,FR0 FMAC FR0,FR5,FR3 F.S FR3,FR0.L R4,R13 R4,R5 STS.L R14,R4 F.S FR4,FR15 BSR _scal2 #12,R14 F.S FR0,FR4 FCMP/GT FR15,FR4 BT L297 R14,R4 R13,R5 BSR _scal2 #12,R14 F.S FR0,FR4 FCMP/GT FR15,FR4 BT L297 R13,R5 BSR scal2 R14,R4 F.S FR0,FR4 FCMP/GT FR15,FR4 BF L295 L297: BRA L293 #0,R0 L295: #1,R0 L293:

38 R15,R0 R15,R3 R15,R2 FSUB FR3,FR2 F.S #4,R0 R0,R1 R4,R1 FSUB FR3,FR2 F.S #8,R0 R0,R1 R4,R1 R15,R3 R15,R1 FSUB FR3,FR2 F.S R15,R3 R15,R0 #4,R8 R15,R7 R7,R8 R15,R6 #4,R7 R6,R7 FMUL FR0,FR3 #8,R0 FMAC FR0,FR2,FR3 FMAC FR0,FR2,FR3 F.S FR3,FR5 FCMP/GT FR4,FR5 BT @(8,R2),R1.L R15,R0

39 237 R15,R3 R15,R2 FSUB FR3,FR2 F.S #4,R0 R0,R1 R4,R1 FSUB FR3,FR2 F.S #8,R0 R0,R1 R4,R1 R15,R3 R15,R1 FSUB FR3,FR2 F.S R15,R3 R15,R0 #4,R8 R15,R7 R7,R8 R15,R6 #4,R7 R6,R7 FMUL FR0,FR3 #8,R0 FMAC FR0,FR2,FR3 FMAC FR0,FR2,FR3 F.S FR3,FR5 FCMP/GT FR4,FR5 BF L282 L284: #12,R15 L282: #1,R0 L280:

40 350byte 104byte 155cycle 75cycle SH-4 x,y,z 1 dv=poli->v[0; SubVect(&dv,p); dst2=scal2(&dv); if (dst2>rad) rerun 0; LOAD 1 LOAD 2 STORE 1 LOAD LOAD/STORE a=*p++; d=*q++; b=*p++; e=*q++; a-=d; c=*p++; f=*q++; b-=e; c-=f; return a*a+b*b+c*c; p q LOAD/STORE 1/3 SuperH FPU P 3 1 FPU 238

41 3.4 switch else if switch else if case 5 6 switch if case switch if switch case if a int x(int a) switch (a) case 1: a = 2; break; case 10: a = 4; break; default: a = 0; break; return (a); int x (int a) if (a==1) a = 2; else if (a==10) a = 4; else a = 0; return (a); _x: L217: L218: L219: L220: CMP/EQ BT CMP/EQ BT BRA BRA BRA R4,R0 #1,R0 L217 #10,R0 L218 L219 L220 #2,R4 L220 #4,R4 #0,R4 _x: L216: L218: L217: CMP/EQ BF BRA CMP/EQ BF BRA R4,R0 #1,R0 L216 L217 #2,R4 #10,R0 L218 L217 #4,R4 #0,R4 R4,R0 239

42 R4,R0 28byte 24byte 16cycle 14cycle a=1 240

43 ROM

44 3.5.1 a b int x[10, y[10; static void g(int *a, int *b, int i) int temp; temp = a[i; a[i = b[i; b[i = temp; void f (void) int i; for (i=0;i<10;i++) g(x, y, i); int x[10, y[10; #pragma inline (g) static void g(int *a, int *b, int i) int temp; temp = a[i; a[i = b[i; b[i = temp; void f (void) int i; for (i=0;i<10;i++) g(x, y, i); L237:.EXPORT.EXPORT.EXPORT.SECTION SHLL2.L.L.L.L.L.L.L.L.L _x _y _f P,CODE,ALIGN=4 #-4,R15 R6,R7 R7 R3,@R7 R6,@R4 #4,R15 R14,@-R15 R13,@-R15 #0,R14 R12,@-R15 L250:.EXPORT.EXPORT.EXPORT.SECTION.L.L.L.L.L SHLL2.L _x _y _f P,CODE,ALIGN=4 R12,@-R15 #0,R4 R11,@-R15 #10,R12 R10,@-R15 L251,R10 L251+4,R11 R4,R0 R11,R1 R10,R6 R0 R0,R7 R6,R7 #1,R4 R1,R5 242

45 243 #10,R13.L STS.L L245+2,R11.L L245+6,R12 L244: R14,R6 R12,R5 BSR L237 R11,R4 #1,R14 CMP/GE R13,R14 BF @R15+,R14 L245:.RES.W 1 _x _y CMP/GE R3,@R7 BF/S @R15+,R12 L251: _x _y 80byte 88byte 315cycle 189cycle

46 code=asmcode big little #define A_MAX 10 typedef unsigned char UChar; short big[a_max,little[a_max; short swap(short p1) short ret; *((UChar *)(&ret)+1) = *((UChar *)(&p1)); *((UChar *)(&ret)) = *((UChar *)(&p1)+1); return ret; #define A_MAX 10 #pragma inline_asm (swap) typedef unsigned char UChar; short big[a_max,little[a_max; short swap(short p1) SWAP.B R4,R0 void f (void) int i; short *x, *y; void f (void) int i; short *x, *y; x = little; y = big; for(i=0; i<a_max; i++, x++, y++) *x = swap(*y); x = little; y = big; for(i=0; i<a_max; i++, x++, y++) *x = swap(*y); _swap: _swap: SWAP.B R4,R0 #-8,R15 R15,R3.ALIGN 4 #6,R3 R15,R2.W R4,@R3 R15,R0.L R14,@-R15 #0,R14 #6,R0 R15,R3.L.L R13,@-R15 R0,@(1,R2).L R11,@-R15 #10,R11 R15,R2 #6,R2.L.L L226+2,R13 BRA L

47 245 #8,R15.L #0,R14.L STS.L #10,R11.L L227+2,R13.L L227+6,R12 L226: BSR #1,R14 CMP/GE R11,R14 BF/S L226 @R15+,R14 L227:.RES.W 1 _little _big L226:.RES.W 1 _little _big L225: SWAP.B R4,R0.ALIGN 4.W R0,@R13 #1,R14 #2,R13 CMP/GE R11,R14 BT/S L227 #2,R12.L L228,R2 @R15+,R14 L228: L224 88byte 76byte 345cycle 189cycle

48 3.6 GBR GBR GBR y x struct char c1; char c2; short s1; short s2; long l1; long l2; x, y; void f (void) x.c1 = y.c1; x.c2 = y.c2; x.s1 = y.s1; x.s2 = y.s2; x.l1 = y.l1; x.l2 = y.l2; #pragma gbr_base(x,y) struct char c1; char c2; short s1; short s2; long l1; long l2; x, y; void f (void) x.c1 = y.c1; x.c2 = y.c2; x.s1 = y.s1; x.s2 = y.s2; x.l1 = y.l1; x.l2 = y.l2;.l.l.b.b.b.b.w.w.w.w.l.l.l.l L217+2,R5 $G0),GBR),R0.B R0,@(_x-(STARTOF $G0)+1,GBR),R0.B R0,@(_x-(STARTOF $G0)+2,GBR),R0.W R0,@(_x-(STARTOF $G0)+4,GBR),R0.W R0,@(_x-(STARTOF $G0)+8,GBR),R0.L R0,@(_x-(STARTOF $G0)+12,GBR),R0.L R0,@(_x(STARTOF $G0)+12,GBR) 246

49 L217:.RES.W 1 _y _x 40byte 26byte 33cycle 30cycle 247

50 ROM 1 2 table typedef int ARRAY[LISTMAX[LISTMAX[LISTMAX; ARRAY ary1, ary2, ary3; void table (void) init(74755, ary1); copy(ary1, ary2); sum(ary1, ary2, ary3); void init (int seed, ARRAY p) int i, j, k; for ( i = 0; i < LISTMAX; i++ ) for ( j = 0; j < LISTMAX; j++ ) for ( k = 0; k < LISTMAX; k++ ) seed = ( seed * 1309 ) & 16383; p[i[j[k = seed; void copy (ARRAY p, ARRAY q) int i, j, k; for ( i = 0; i < LISTMAX; i++ ) for ( j = 0; j < LISTMAX; j++ ) for ( k = 0; k < LISTMAX; k++ ) q[k[i[j = p[i[j[k; void sum (ARRAY p, ARRAY q, ARRAY r) int i, j, k; for ( i = 0; i < LISTMAX; i++ ) for ( j = 0; j < LISTMAX; j++ ) for ( k = 0; k < LISTMAX; k++ ) r[i[j[k = p[i[j[k + q[i[j[j; #pragma regsave (table) #pragma noregalloc (table) #pragma noregsave (init, copy, sum) typedef int ARRAY[LISTMAX[LISTMAX[LISTMAX; ARRAY ary1, ary2, ary3; void table (void) init(74755, ary1); copy(ary1, ary2); sum(ary1, ary2, ary3); void init (int seed, ARRAY p) int i, j, k; for ( i = 0; i < LISTMAX; i++ ) for ( j = 0; j < LISTMAX; j++ ) for ( k = 0; k < LISTMAX; k++ ) seed = ( seed * 1309 ) & 16383; p[i[j[k = seed; void copy (ARRAY p, ARRAY q) int i, j, k; for ( i = 0; i < LISTMAX; i++ ) for ( j = 0; j < LISTMAX; j++ ) for ( k = 0; k < LISTMAX; k++ ) q[k[i[j = p[i[j[k; void sum (ARRAY p, ARRAY q, ARRAY r) int i, j, k; for ( i = 0; i < LISTMAX; i++ ) for ( j = 0; j < LISTMAX; j++ ) for ( k = 0; k < LISTMAX; k++ )

51 249 _table:. STS.L L250+6,R14.L L250+10,R4 BSR _init R14,R5.L L250+14,R5 BSR _copy R14,R4 R14,R4 L250+18,R6.L L250+14,R5 BRA _init: #0,R7.L #2,R6.L #0,R11.L R5,R11.L STS.L R7,R8.W L250,R9.W L250+2,R10 L241: R7,R12 #0,R1 R11,R1 L242: R7,R0 #0,R5 R1,R5 L243: MUL.L R9,R4 #1,R0 STS MACL,R3 R3,R4 AND R10,R4 CMP/GE R6,R0.L BF/S L243 #4,R5 #1,R12 CMP/GE R6,R12 BF/S L242 #8,R1 #1,R8 CMP/GE R6,R8 BF/S L241 #16,R11 r[i[j[k = p[i[j[k + q[i[j[j; _table:.l R14,@-R15.L R13,@-R15.L R12,@-R15.L R11,@-R15.L R10,@-R15.L R9,@-R15.L R8,@-R15 STS.L PR,@-R15 STS.L MACH,@-R15 STS.L MACL,@-R15.L L250+6,R5.L L250+10,R4 BSR _init.l L250+14,R5.L L250+6,R4 BSR _copy.l L250+18,R6.L L250+14,R5.L L250+6,R4 BSR _sum @R15+,R14 _init:.w L250,R9 #2,R6.W L250+2,R10 #0,R11 #0,R7 R7,R8 R5,R11 L241: R7,R12 #0,R1 R11,R1 L242: R7,R0 #0,R5 R1,R5 L243: #1,R0 MUL.L R9,R4 CMP/GE R6,R0 STS MACL,R3 R3,R4

52 _copy:.l #2,R7.L #0,R12.L R12,R11.L #-4,R15 L244: R12,R14 R11,R8 SHLL2 R8 SHLL R8 R11,R3 SHLL2 R3 SHLL2 R3 R4,R3.L L245: #0,R6 R14,R10 SHLL2 R10 SHLL R10 R3,R10 R5,R6 R14,R1 SHLL2 R1 L246: #1,R13 R8,R0 CMP/GE R7,R13.L BF/S L246 #16,R6 #1,R14 CMP/GE R7,R14 BF L245 #1,R11 CMP/GE R7,R11 BF L250:.DATA.W H'051D AND R10,R4.L BF/S L243 #4,R5 #1,R12 CMP/GE R6,R12 BF/S L242 #8,R1 #1,R8 CMP/GE R6,R8 BF/S L241 #16,R11 _copy: #-4,R15 #0,R12 #2,R7 R12,R11 L244: R12,R14 R11,R8 SHLL2 R8 SHLL R8 R11,R3 SHLL2 R3 SHLL2 R3 R4,R3.L L245: #0,R6 R14,R10 SHLL2 R10 SHLL R10 R3,R10 R5,R6 R14,R1 SHLL2 R1 L246: #1,R13 R8,R0 CMP/GE R7,R13.L BF/S L246 #16,R6 #1,R14 CMP/GE R7,R14 BF L245 #1,R11 CMP/GE R7,R11 BF L244 #4,R15 _sum: #-4,R15 #2,R11 #0,R12 R12,R8 L247:

53 251.DATA.W H'3FFF.RES.W 1 _ary1 H' _ary2 _ary3 _sum:.l R14,@-R15.L R13,@-R15.L R12,@-R15 #0,R12.L R11,@-R15 #2,R11.L R10,@-R15.L R9,@-R15.L R8,@-R15 #-4,R15 R12,R8 L247: R12,R10 R8,R13 SHLL2 R13 SHLL2 R13 L248: R12,R9 R12,R7 R10,R14 SHLL2 R14 SHLL R14 R10,R3 SHLL2 R3.L R3,@R15 L249: R13,R0 R6,R0 R14,R0 R7,R0 R13,R3.L R0,@-R15 #1,R9 R5,R3 R4,R2 R14,R2 CMP/GE R1,R3.L R3,@R2 BF/S L249 #4,R7 #1,R10 CMP/GE R11,R10 BF L248 #1,R8 CMP/GE R11,R8 BF L247 R12,R10 R8,R13 SHLL2 R13 SHLL2 R13 L248: R12,R9 R12,R7 R10,R14 SHLL2 R14 SHLL R14 R10,R3 SHLL2 R3.L R3,@R15 L249: R13,R0 R6,R0 R14,R0 R7,R0 R13,R3.L R0,@-R15 #1,R9 R5,R3 R4,R2 R14,R2 CMP/GE R1,R3.L R3,@R2 BF/S L249 #4,R7 #1,R10 CMP/GE R11,R10 BF L248 #1,R8 CMP/GE R11,R8 BF L247 #4,R15 L250:.DATA.W H'051D.DATA.W H'3FFF.RES.W 1 _ary1 H' _ary2 _ary3

54 @R15+,R14 360byte 656cycle 324byte 641cycle 252

55 ROM 2 2 x 1 g extern int x; extern void g(void); void f (void) if (x == 1) g(); #pragma abs16(x,g) extern int x; extern void g(void); void f (void) if (x == 1) g();.l.l CMP/EQ BF.L JMP L219: L218:.RES.W 1 _x _g #1,R0 L219 L219: L218:.W.L CMP/EQ BF.W JMP.DATA.W.DATA.W #1,R0 L219 _x _g 28byte 22byte 20cycle 20cycle (1) x=1, g void g( ) (2) SH-3 253

56 SH-3 SH-3E SH-4 a b c (PREF1,2 ) int a[1200, b[1200, c[1200; int f (void) int i; int *pa, *pb, *pc; for (pa=a, pb=b, pc=c, i=0; i<1200; i+=4) *pc++ = *pa++ * *pb++; *pc++ = *pa++ * *pb++; *pc++ = *pa++ * *pb++; *pc++ = *pa++ * *pb++; #include <umachine.h> int a[1200, b[1200, c[1200; int f (void) int i; int *pa, *pb, *pc; for (pa=a, pb=b, pc=c, i=0; i<1200; i+=4) #ifdef PREF1 prefetch(pa+8); #endif *pc++ = *pa++ * *pb++; *pc++ = *pa++ * *pb++; #ifdef PREF2 prefetch(pb+8); #endif *pc++ = *pa++ * *pb++; *pc++ = *pa++ * *pb++; 254 STS.L MACL,@-R15.W #0,R7 L243,R0.L.L L243+2,R6 L243+6,R4.L L242: #4,R7.L R0,R7 MUL.L R2,R1 L242: STS.L MACL,@-R15 #0,R7.W L243,R0.L L243+2,R5.L L243+6,R4.L L243+10,R6 R5,R3

57 STS.L.L.L MUL.L STS.L.L.L MUL.L STS.L.L.L MUL.L STS.L BF/S LDS.L L243:.DATA.W R2,R1 R2,R1 R2,R1 MACL,R2 L242 H'04B0 _a _b MUL.L STS R3,R1 MUL.L R4,R2 R3,R1 STS #32,R2 MACL,R3.L CMP/GE MUL.L R0,R7 R2,R1 STS.L MACL,R2 R2,R1 STS.L MACL,R2 BF/S L242 #4,R6 L243:.DATA.W H 04B0 _a _b _c PREFPREF, 84byte 92byte 96byte 91,327cycle 89,526cycle 84,696cycle cpu=sh

58 3.9.2 a,b,c,d di= j bj-aj typedef struct float a,b,c,d; data_t; #define STRIDE 512 typedef struct float a,b,c,d; data_t; f(data_t data[, int n) data_t *p,*q; data_t *p_end = &data[n; data_t *q_end = p_end; float a,d; f(data_t data[, int n) data_t *p,*q, *end=&data[n; data_t *pp, *qq; data_t *pp_end, *qq_end; float a,d; for (p = data; p < p_end; p++) a = p->a; for (p = data; p < end; p = pp_end) d = 0.0f; pp_end = p + STRIDE; for (q = data; q < q_end; q++) for (q = data; q < end; q = qq_end) d += q->b -a; qq_end = q + STRIDE; for (pp = p; pp < pp_end && pp p->d=d; <end; pp++) a = pp->a; d = pp->d; for (qq = q; qq < qq_end && qq < end; qq++) d += qq->b -a; p->d = d;.l SHLL2 R5,R1 R1.L SHLL2 FLDI0 R1 FR6 SHLL2.L BRA R4,R1 L244 SHLL2.L R14,@-R15 R5,R7 R13,@-R15 R7 R11,@-R15 R7 R10,@-R15 256

59 257 R4,R6 L245: R4,R5 CMP/HS R1,R5 BT/S L246 F.S FR6,FR4 L247: STS FPSCR,R3.L L248,R2 #4,R0 #16,R5 AND R2,R3 CMP/HS R1,R5 LDS R3,FPSCR FSUB FR5,FR3 BF/S L247 F FR3,FR4 L246: #12,R0 F.S FR4,@(R0,R6) #16,R6 L244: CMP/HS R1,R6 BF L245 L248: H'FFE7FFFF.END R4,R7.W L259,R11 BRA L249 R4,R13 L250: R13,R10 R11,R10 BRA L251 R4,R14 L252: R14,R1 R11,R1 BRA L253 R13,R6 L254: #12,R0 BRA L255 R14,R5 L256: STS FPSCR,R3.L L259+2,R2 #4,R0 #16,R5 AND R2,R3 LDS R3,FPSCR FSUB FR5,FR3 F FR3,FR4 L255: CMP/HS R1,R5 BT L257 CMP/HS R7,R5 BF L256 L257: #12,R0 #16,R6 F.S FR4,@(R0,R13) L253: CMP/HS R10,R6 BT L258 CMP/HS R7,R6 BF L254 L258: R1,R14 L251: CMP/HS R7,R14 BF L252 R10,R13 L249: CMP/HS R7,R13 L259:.DATA.W H'2000 H'FFE7FFFF.END

60 (SH-4) 52byte 1, cycle n=8192 STRIDE= byte 1, cycle 4 data[0->d data[0~data[n-1 data[1->d data[0~data[n-1 data[0 258

61 SH-4 data tbl ret void mtrx4mul1 (float data[4[4, float tbl[4[4, float ret[4[4) int i,j,k; for(i=0;i<4;i++) for(j=0;j<4;j++) for(k=0;k<4;k++) ret[i[j+= data[i[k*tbl[k[j; _mtrx4mul1:.l.l.l.l.l.l.l.l L255:.L SHLL2 SHLL2 L256: SHLL2 L257: R14,@-R15 R13,@-R15 #4,R14 R12,@-R15 R11,@-R15 R10,@-R15 R9,@-R15 R8,@-R15 #0,R8 #-4,R15 R11 R11 R8,R9 R9,R12 #0,R7 R12 #0,R13 R8,R10 R5,R7 #include <machine.h> void _mtrx4mul (float data[4[4, float tbl[4[4,float ret[4[4) ld_ext(data); mtrx4mul(tbl,ret); mtrx4mul:.l.l.l.l FRCHG F.S F.S F.S F.S F.S F.S F.S F.S F.S F.S F.S F.S F.S F.S F.S F.S FRCHG.L.L #-12,R15 R4,@(8,R15) @R2+,FR15 259

62 260 R11,R3 R4,R3 R13,R3 R11,R0 R6,R0 R12,R0.L STS FPSCR,R3.L L259+10,R1 OR R12,R0 LDS R3,FPSCR #16,R7 #1,R10 FMAC FR0,FR3,FR2 F.S CMP/GE R14,R10 BF/S L257 #4,R13 #1,R9 CMP/GE R14,R9 BF #1,R3 CMP/GE R14,R3 BF/S @R15+,R12.L FTRV XMTRX,FV0 #16,R1 F.S F.S F.S F.S FTRV XMTRX,FV0 #32,R1 F.S F.S F.S F.S FTRV XMTRX,FV0 #32,R1 F.S F.S F.S F.S FTRV XMTRX,FV0 #32,R1 F.S F.S F.S F.S #12,R15 110byte 118byte 951cycle 88cycle

63 3.11 SH-3E,SH-4 FDIV,FSQRT SH-4 12 #include <mathf.h> #include <mathf.h> float func21(float *p, int cnt) float func1(float *p, int cnt) float ret=0.0f; float ret=0.0f; float sq=0.0f; do do ret+=sqrtf(*p++); ret+=sq; x(); sq=sqrtf(*p++); x(); while(cnt--); while (cnt--); return ret; return ret; _func1:.l F.S STS.L #-8,R15 L270,R14 L266: FLDI0 #4,R3.L #-4,R3 F.S FR3 JSR F R14 #-1,R3.L R3,@R15 #1,R3 TST R3,R3 _func21:.l F.S F.S STS.L.L.L FLDI0.L F.S F.S L268:.L F.L F.S JSR FSQRT.L R14,@-R15 FR15,@-R15 FR14,@-R15 PR,@-R15 #-8,R15 R4,@(4,R15) R5,@R15 FR4 L270,R14 FR4,FR15 FR15,FR14 #4,R3 #-1,R3 261

64 L270: BF F.S LDS.L F.S.L BF F.S LDS.L F.S F.S.L.END L266 @R15+,R14 L268 _x L270:.L TST BF F.S LDS.L F.S F.S.L.END #1,R3 R3,R3 L268 _x FSQRT F FSQRT F FSQRT F F 28byte 1 9cycle (FSQRT ) 28byte 0cycle 262

65 3.12 SuperH SuperH CPU CPU CPU CPU CPU 2 (1) (2) 263

66 264 (1) (2) CPU LRU way

67 way way SH7604,SH7708,7707,7709, way 265

68 3.13 SuperH SuperH 1. SH7032,34,20,21 (SH-1) ROM/RAM CPU ROM/RAM CPU 2. SH704x (SH-2) ROM/RAM CPU SH7034 CPU RAM 1KB RAM2KB KB ROM/RAM ROM/RAM RAM 4KB 2KB 1KB RAM2KB 4KB RAM ROM 3. SH7604 (SH-2) ROM CPU 4 4KB SH7707,8,9 (SH-3) ROM CPU 4 8KB

69 5. SH7750 (SH-4) 8KB KB 2 16KB KB RAM 32byte 2 267

70 3.14 (1) SuperH RISC engine / SuperH RISC engine / ++ align16 (a) (b) (2) [1 [2 [3 [4 [5 [3 CPU [3[4[5 [1 268

71 [1 (3)

72 270

SuperH RISC engine C/C++ コンパイラ Ver.7 不具合内容 - 過去のお知らせ SuperH RISC engine C/C++ コンパイラ Ver.7 台における不具合内容を以下に示します のチェックツールをルネサスエレクトロニクス株式会社のホームページ

SuperH RISC engine C/C++ コンパイラ Ver.7 不具合内容 - 過去のお知らせ SuperH RISC engine C/C++ コンパイラ Ver.7 台における不具合内容を以下に示します のチェックツールをルネサスエレクトロニクス株式会社のホームページ SuperH RISC engine C/C++ コンパイラ Ver.7 不具合内容 - 過去のお知らせ SuperH RISC engine C/C++ コンパイラ Ver.7 台における不具合内容を以下に示します 1. 2. 4. のチェックツールをルネサスエレクトロニクス株式会社のホームページより入手できます http//tool-support.renesas.com/jpn/toolnews/shc/shcv7/dr_shcv7_4.html

More information

‚æ4›ñ

‚æ4›ñ ( ) ( ) ( ) A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 (OUS) 9 26 1 / 28 ( ) ( ) ( ) A B C D Z a b c d z 0 1 2 9 (OUS) 9

More information

橡furoku.PDF

橡furoku.PDF [ ] 364 [ ] A. 1 r p nm b 1 w2 l 4 s 4 [ ] d 8 [ ] s u r _subdr,_divdr _subd,_divd p nm _muli 2 _ to i u s d 3 _ sta_ sft sta_ l r *1 l a *2 0 31 *1 r *2 sta_ 4 365 [ ] B. B.1 Ver.1.0 Ver.2.0 SHC Ver.2.0

More information

untitled

untitled H8/300,H8S,H8SX [H8S,H8/300 Tool Chain Ver6.2.0.0] #define Inline static inline //************************************************** Inline char sil_and_mem(char *mem,char and) return (*((volatile

More information

untitled

untitled II yacc 005 : 1, 1 1 1 %{ int lineno=0; 3 int wordno=0; 4 int charno=0; 5 6 %} 7 8 %% 9 [ \t]+ { charno+=strlen(yytext); } 10 "\n" { lineno++; charno++; } 11 [^ \t\n]+ { wordno++; charno+=strlen(yytext);}

More information

PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU

PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU 1. 1.1. 1.2. 1 PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU 2. 2.1. 2 1 2 C a b N: PC BC c 3C ac b 3 4 a F7 b Y c 6 5 a ctrl+f5) 4 2.2. main 2.3. main 2.4. 3 4 5 6 7 printf printf

More information

76 3 B m n AB P m n AP : PB = m : n A P B P AB m : n m < n n AB Q Q m A B AQ : QB = m : n (m n) m > n m n Q AB m : n A B Q P AB Q AB 3. 3 A(1) B(3) C(

76 3 B m n AB P m n AP : PB = m : n A P B P AB m : n m < n n AB Q Q m A B AQ : QB = m : n (m n) m > n m n Q AB m : n A B Q P AB Q AB 3. 3 A(1) B(3) C( 3 3.1 3.1.1 1 1 A P a 1 a P a P P(a) a P(a) a P(a) a a 0 a = a a < 0 a = a a < b a > b A a b a B b B b a b A a 3.1 A() B(5) AB = 5 = 3 A(3) B(1) AB = 3 1 = A(a) B(b) AB AB = b a 3.1 (1) A(6) B(1) () A(

More information

Java Java Java Java Java 4 p * *** ***** *** * Unix p a,b,c,d 100,200,250,500 a*b = a*b+c = a*b+c*d = (a+b)*(c+d) = 225

Java Java Java Java Java 4 p * *** ***** *** * Unix p a,b,c,d 100,200,250,500 a*b = a*b+c = a*b+c*d = (a+b)*(c+d) = 225 Java Java Java Java Java 4 p35 4-2 * *** ***** *** * Unix p36 4-3 a,b,c,d 100,200,250,500 a*b = 20000 a*b+c = 20250 a*b+c*d = 145000 (a+b)*(c+d) = 225000 a+b*c+d = 50600 b/a+d/c = 4 p38 4-4 (1) mul = 1

More information

PowerPoint Presentation

PowerPoint Presentation p.130 p.198 p.208 2 double weight[num]; double min, max; min = max = weight[0]; for( i= 1; i i < NUM; i++ ) ) if if ( weight[i] > max ) max = weight[i]: if if ( weight[i] < min ) min = weight[i]: weight

More information

For_Beginners_CAPL.indd

For_Beginners_CAPL.indd CAPL Vector Japan Co., Ltd. 目次 1 CAPL 03 2 CAPL 03 3 CAPL 03 4 CAPL 04 4.1 CAPL 4.2 CAPL 4.3 07 5 CAPL 08 5.1 CANoe 5.2 CANalyzer 6 CAPL 10 7 CAPL 11 7.1 CAPL 7.2 CAPL 7.3 CAPL 7.4 CAPL 16 7.5 18 8 CAPL

More information

SuperH RISC engineファミリ用 C/C++コンパイラパッケージ V.7~V.9 ご使用上のお願い

SuperH RISC engineファミリ用 C/C++コンパイラパッケージ V.7~V.9 ご使用上のお願い ツールニュース RENESAS TOOL NEWS 2014 年 02 月 01 日 : 140201/tn1 SuperH RISC engine ファミリ用 C/C++ コンパイラパッケージ V.7~V.9 ご使用上のお願い SuperH RISC engine ファミリ用 C/C++ コンパイラパッケージ V.7~V.9の使用上の注意事項 4 件を連絡します 同一ループ内の異なる配列要素に 同一の添え字を使用した場合の注意事項

More information

新版明解C言語 実践編

新版明解C言語 実践編 2 List - "max.h" a, b max List - max "max.h" #define max(a, b) ((a) > (b)? (a) : (b)) max List -2 List -2 max #include "max.h" int x, y; printf("x"); printf("y"); scanf("%d", &x); scanf("%d", &y); printf("max(x,

More information

O(N) ( ) log 2 N

O(N) ( ) log 2 N 2005 11 21 1 1.1 2 O(N) () log 2 N 1.2 2 1 List 3-1 List 3-3 List 3-4? 3 3.1 3.1.1 List 2-1(p.70) 1 1 10 1 3.1.2 List 3-1(p.70-71) 1 1 2 1 2 2 1: 1 3 3.1.3 1 List 3-1(p.70-71) 2 #include stdlib.h

More information

Microsoft PowerPoint - CproNt02.ppt [互換モード]

Microsoft PowerPoint - CproNt02.ppt [互換モード] 第 2 章 C プログラムの書き方 CPro:02-01 概要 C プログラムの構成要素は関数 ( プログラム = 関数の集まり ) 関数は, ヘッダと本体からなる 使用する関数は, プログラムの先頭 ( 厳密には, 使用場所より前 ) で型宣言 ( プロトタイプ宣言 ) する 関数は仮引数を用いることができる ( なくてもよい ) 関数には戻り値がある ( なくてもよい void 型 ) コメント

More information

[1] #include<stdio.h> main() { printf("hello, world."); return 0; } (G1) int long int float ± ±

[1] #include<stdio.h> main() { printf(hello, world.); return 0; } (G1) int long int float ± ± [1] #include printf("hello, world."); (G1) int -32768 32767 long int -2147483648 2147483647 float ±3.4 10 38 ±3.4 10 38 double ±1.7 10 308 ±1.7 10 308 char [2] #include int a, b, c, d,

More information

(Version: 2017/4/18) Intel CPU 1 Intel CPU( AMD CPU) 64bit SIMD Inline Assemler Windows Visual C++ Linux gcc 2 FPU SSE2 Intel CPU do

(Version: 2017/4/18) Intel CPU 1 Intel CPU( AMD CPU) 64bit SIMD Inline Assemler Windows Visual C++ Linux gcc 2 FPU SSE2 Intel CPU do (Version: 2017/4/18) Intel CPU (kashi@waseda.jp) 1 Intel CPU( AMD CPU) 64bit SIMD Inline Assemler Windows Visual C++ Linux gcc 2 FPU SSE2 Intel CPU double 8087 FPU (floating point number processing unit)

More information

解きながら学ぶC++入門編

解きながら学ぶC++入門編 !... 38!=... 35 "... 112 " "... 311 " "... 4, 264 #... 371 #define... 126, 371 #endif... 369 #if... 369 #ifndef... 369 #include... 3, 311 #undef... 371 %... 17, 18 %=... 85 &... 222 &... 203 &&... 40 &=...

More information

[ 1] 1 Hello World!! 1 #include <s t d i o. h> 2 3 int main ( ) { 4 5 p r i n t f ( H e l l o World!! \ n ) ; 6 7 return 0 ; 8 } 1:

[ 1] 1 Hello World!! 1 #include <s t d i o. h> 2 3 int main ( ) { 4 5 p r i n t f ( H e l l o World!! \ n ) ; 6 7 return 0 ; 8 } 1: 005 9 7 1 1.1 1 Hello World!! 5 p r i n t f ( H e l l o World!! \ n ) ; 7 return 0 ; 8 } 1: 1 [ ] Hello World!! from Akita National College of Technology. 1 : 5 p r i n t f ( H e l l o World!! \ n ) ;

More information

Java演習(4) -- 変数と型 --

Java演習(4)   -- 変数と型 -- 50 20 20 5 (20, 20) O 50 100 150 200 250 300 350 x (reserved 50 100 y 50 20 20 5 (20, 20) (1)(Blocks1.java) import javax.swing.japplet; import java.awt.graphics; (reserved public class Blocks1 extends

More information

Microsoft Word - Sample_CQS-Report_English_backslant.doc

Microsoft Word - Sample_CQS-Report_English_backslant.doc ***** Corporation ANSI C compiler test system System test report 2005/11/16 Japan Novel Corporation *****V43/NQP-DS-501-1 Contents Contents......2 1. Evaluated compiler......3 1.1. smp-compiler compiler...3

More information

1 4 2 EP) (EP) (EP)

1 4 2 EP) (EP) (EP) 2003 2004 2 27 1 1 4 2 EP) 5 3 6 3.1.............................. 6 3.2.............................. 6 3.3 (EP)............... 7 4 8 4.1 (EP).................... 8 4.1.1.................... 18 5 (EP)

More information

Minimum C Minimum C Minimum C BNF T okenseq W hite Any D

Minimum C Minimum C Minimum C BNF T okenseq W hite Any D 6 2019 5 14 6.1 Minimum C....................... 6 1 6.2....................................... 6 7 6.1 Minimum C Minimum C BNF T okenseq W hite Any Digit ::= 0 1 2... 9. Number ::= Digit Digit. Alphabet

More information

double float

double float 2015 3 13 1 2 2 3 2.1.......................... 3 2.2............................. 3 3 4 3.1............................... 4 3.2 double float......................... 5 3.3 main.......................

More information

新・明解C言語 ポインタ完全攻略

新・明解C言語 ポインタ完全攻略 2 1-1 1-1 /* 1-1 */ 1 int n = 100; int *p = &n; printf(" n %d\n", n); /* n int */ printf("*&n %d\n", *&n); /* *&n int */ printf(" p %p\n", p); /* p int * */ printf("&*p %p\n", &*p); /* &*p int * */ printf("sizeof(n)

More information

only my information

only my information 1 only my information 2010 17 Special thanks 17 2006 2010 60 90 A4 2 1 1 CD 2 3 A B A B A 1/4 B B 3/4 1. 2. A 3 A 3. B 3 B http://www.edu.c.utokyo.ac.jp/edu/information.html only my information 2 2006

More information

Microsoft Word - C.....u.K...doc

Microsoft Word - C.....u.K...doc C uwêííôöðöõ Ð C ÔÖÐÖÕ ÐÊÉÌÊ C ÔÖÐÖÕÊ C ÔÖÐÖÕÊ Ç Ê Æ ~ if eíè ~ for ÒÑÒ ÌÆÊÉÉÊ ~ switch ÉeÍÈ ~ while ÒÑÒ ÊÍÍÔÖÐÖÕÊ ~ 1 C ÔÖÐÖÕ ÐÊÉÌÊ uê~ ÏÒÏÑ Ð ÓÏÖ CUI Ô ÑÊ ÏÒÏÑ ÔÖÐÖÕÎ d ÈÍÉÇÊ ÆÒ Ö ÒÐÑÒ ÊÔÎÏÖÎ d ÉÇÍÊ

More information

64bit SSE2 SSE2 FPU Visual C++ 64bit Inline Assembler 4 FPU SSE2 4.1 FPU Control Word FPU 16bit R R R IC RC(2) PC(2) R R PM UM OM ZM DM IM R: reserved

64bit SSE2 SSE2 FPU Visual C++ 64bit Inline Assembler 4 FPU SSE2 4.1 FPU Control Word FPU 16bit R R R IC RC(2) PC(2) R R PM UM OM ZM DM IM R: reserved (Version: 2013/5/16) Intel CPU (kashi@waseda.jp) 1 Intel CPU( AMD CPU) 64bit SIMD Inline Assemler Windows Visual C++ Linux gcc 2 FPU SSE2 Intel CPU double 8087 FPU (floating point number processing unit)

More information

やさしいJavaプログラミング -Great Ideas for Java Programming サンプルPDF

やさしいJavaプログラミング -Great Ideas for Java Programming サンプルPDF pref : 2004/6/5 (11:8) pref : 2004/6/5 (11:8) pref : 2004/6/5 (11:8) 3 5 14 18 21 23 23 24 28 29 29 31 32 34 35 35 36 38 40 44 44 45 46 49 49 50 pref : 2004/6/5 (11:8) 50 51 52 54 55 56 57 58 59 60 61

More information

解きながら学ぶJava入門編

解きながら学ぶJava入門編 44 // class Negative { System.out.print(""); int n = stdin.nextint(); if (n < 0) System.out.println(""); -10 Ÿ 35 Ÿ 0 n if statement if ( ) if i f ( ) if n < 0 < true false true false boolean literalboolean

More information

£Ã¥×¥í¥°¥é¥ß¥ó¥°(2018) - Âè11²ó – ½ÉÂꣲ¤Î²òÀ⡤±é½¬£² –

£Ã¥×¥í¥°¥é¥ß¥ó¥°(2018) - Âè11²ó – ½ÉÂꣲ¤Î²òÀ⡤±é½¬£² – (2018) 11 2018 12 13 2 g v dv x dt = bv x, dv y dt = g bv y (1) b v 0 θ x(t) = v 0 cos θ ( 1 e bt) (2) b y(t) = 1 ( v 0 sin θ + g ) ( 1 e bt) g b b b t (3) 11 ( ) p14 2 1 y 4 t m y > 0 y < 0 t m1 h = 0001

More information

1.ppt

1.ppt /* * Program name: hello.c */ #include int main() { printf( hello, world\n ); return 0; /* * Program name: Hello.java */ import java.io.*; class Hello { public static void main(string[] arg)

More information

( ) 1 1: 1 #include <s t d i o. h> 2 #include <GL/ g l u t. h> 3 #include <math. h> 4 #include <s t d l i b. h> 5 #include <time. h>

( ) 1 1: 1 #include <s t d i o. h> 2 #include <GL/ g l u t. h> 3 #include <math. h> 4 #include <s t d l i b. h> 5 #include <time. h> 2007 12 5 1 2 2.1 ( ) 1 1: 1 #include 2 #include 3 #include 4 #include 5 #include 6 7 #define H WIN 400 // 8 #define W WIN 300 // 9

More information

- - http://168iroha.net 018 10 14 i 1 1 1.1.................................................... 1 1.................................................... 7.1................................................

More information

1 1 2 2 2.1 Java......... 2 2.2................................. 3 2.3.................................. 3 3 4 3.1....................................

1 1 2 2 2.1 Java......... 2 2.2................................. 3 2.3.................................. 3 3 4 3.1.................................... 06H082 1 1 2 2 2.1 Java......... 2 2.2................................. 3 2.3.................................. 3 3 4 3.1..................................... 4 3.2 GP.....................................

More information

char int float double の変数型はそれぞれ 文字あるいは小さな整数 整数 実数 より精度の高い ( 数値のより大きい より小さい ) 実数 を扱う時に用いる 備考 : 基本型の説明に示した 浮動小数点 とは数値を指数表現で表す方法である 例えば は指数表現で 3 書く

char int float double の変数型はそれぞれ 文字あるいは小さな整数 整数 実数 より精度の高い ( 数値のより大きい より小さい ) 実数 を扱う時に用いる 備考 : 基本型の説明に示した 浮動小数点 とは数値を指数表現で表す方法である 例えば は指数表現で 3 書く 変数 入出力 演算子ここまでに C 言語プログラミングの様子を知ってもらうため printf 文 変数 scanf 文 if 文を使った簡単なプログラムを紹介した 今回は変数の詳細について習い それに併せて使い方が増える入出力処理の方法を習う また 演算子についての復習と供に新しい演算子を紹介する 変数の宣言プログラムでデータを取り扱う場合には対象となるデータを保存する必要がでてくる このデータを保存する場所のことを

More information

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D II 8 2003 11 12 1 6 ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 Daisuke 8 =>. 73 Daisuke 35 Hiroshi 64 Ichiro 87 Junko

More information

XMPによる並列化実装2

XMPによる並列化実装2 2 3 C Fortran Exercise 1 Exercise 2 Serial init.c init.f90 XMP xmp_init.c xmp_init.f90 Serial laplace.c laplace.f90 XMP xmp_laplace.c xmp_laplace.f90 #include int a[10]; program init integer

More information

1 return main() { main main C 1 戻り値の型 関数名 引数 関数ブロックをあらわす中括弧 main() 関数の定義 int main(void){ printf("hello World!!\n"); return 0; 戻り値 1: main() 2.2 C main

1 return main() { main main C 1 戻り値の型 関数名 引数 関数ブロックをあらわす中括弧 main() 関数の定義 int main(void){ printf(hello World!!\n); return 0; 戻り値 1: main() 2.2 C main C 2007 5 29 C 1 11 2 2.1 main() 1 FORTRAN C main() main main() main() 1 return 1 1 return main() { main main C 1 戻り値の型 関数名 引数 関数ブロックをあらわす中括弧 main() 関数の定義 int main(void){ printf("hello World!!\n"); return

More information

64bit SSE2 SSE2 FPU Visual C++ 64bit Inline Assembler 4 FPU SSE2 4.1 FPU Control Word FPU 16bit R R R IC RC(2) PC(2) R R PM UM OM ZM DM IM R: reserved

64bit SSE2 SSE2 FPU Visual C++ 64bit Inline Assembler 4 FPU SSE2 4.1 FPU Control Word FPU 16bit R R R IC RC(2) PC(2) R R PM UM OM ZM DM IM R: reserved (Version: 2013/7/10) Intel CPU (kashi@waseda.jp) 1 Intel CPU( AMD CPU) 64bit SIMD Inline Assemler Windows Visual C++ Linux gcc 2 FPU SSE2 Intel CPU double 8087 FPU (floating point number processing unit)

More information

プログラミング方法論 II 第 14,15 回 ( 担当 : 鈴木伸夫 ) 問題 17. x 座標と y 座標をメンバに持つ構造体 Point を作成せよ 但し座標 は double 型とする typedef struct{ (a) x; (b) y; } Point; 問題 18. 問題 17 の

プログラミング方法論 II 第 14,15 回 ( 担当 : 鈴木伸夫 ) 問題 17. x 座標と y 座標をメンバに持つ構造体 Point を作成せよ 但し座標 は double 型とする typedef struct{ (a) x; (b) y; } Point; 問題 18. 問題 17 の プログラミング方法論 II 第 14,15 回 ( 担当 : 鈴木伸夫 ) 問題 17. x 座標と y 座標をメンバに持つ構造体 Point を作成せよ 但し座標 は double 型とする typedef struct{ (a) x; (b) y; Point; 問題 18. 問題 17 の Point を用いて 2 点の座標を入力するとその 2 点間の距 離を表示するプログラムを作成せよ 平方根は

More information

1/68 A. 電気所 ( 発電所, 変電所, 配電塔 ) における変圧器の空き容量一覧 平成 31 年 3 月 6 日現在 < 留意事項 > (1) 空容量は目安であり 系統接続の前には 接続検討のお申込みによる詳細検討が必要となります その結果 空容量が変更となる場合があります (2) 特に記載

1/68 A. 電気所 ( 発電所, 変電所, 配電塔 ) における変圧器の空き容量一覧 平成 31 年 3 月 6 日現在 < 留意事項 > (1) 空容量は目安であり 系統接続の前には 接続検討のお申込みによる詳細検討が必要となります その結果 空容量が変更となる場合があります (2) 特に記載 1/68 A. 電気所 ( 発電所, 変電所, 配電塔 ) における変圧器の空き容量一覧 平成 31 年 3 月 6 日現在 < 留意事項 > (1) 空容量は目安であり 系統接続の前には 接続検討のお申込みによる詳細検討が必要となります その結果 空容量が変更となる場合があります (2) 特に記載のない限り 熱容量を考慮した空き容量を記載しております その他の要因 ( 電圧や系統安定度など ) で連系制約が発生する場合があります

More information

2 P.S.P.T. P.S.P.T. wiki 26

2 P.S.P.T. P.S.P.T. wiki  26 P.S.P.T. C 2011 4 10 2 P.S.P.T. P.S.P.T. wiki p.s.p.t.since1982@gmail.com http://www23.atwiki.jp/pspt 26 3 2 1 C 8 1.1 C................................................ 8 1.1.1...........................................

More information

K227 Java 2

K227 Java 2 1 K227 Java 2 3 4 5 6 Java 7 class Sample1 { public static void main (String args[]) { System.out.println( Java! ); } } 8 > javac Sample1.java 9 10 > java Sample1 Java 11 12 13 http://java.sun.com/j2se/1.5.0/ja/download.html

More information

SystemC言語概論

SystemC言語概論 SystemC CPU S/W 2004/01/29 4 SystemC 1 SystemC 2.0.1 CPU S/W 3 ISS SystemC Co-Simulation 2004/01/29 4 SystemC 2 ISS SystemC Co-Simulation GenericCPU_Base ( ) GenericCPU_ISS GenericCPU_Prog GenericCPU_CoSim

More information

SystemC 2.0を用いた簡易CPUバスモデルの設計

SystemC 2.0を用いた簡易CPUバスモデルの設計 SystemC 2.0 CPU CPU CTD&SW CT-PF 2002/1/23 1 CPU BCA UTF GenericCPU IO (sc_main) 2002/1/23 2 CPU CPU CQ 1997 11 Page 207 4 Perl Verilog-HDL CPU / Verilog-HDL SystemC 2.0 (asm) ROM (test.hex) 2002/1/23

More information

8 if switch for while do while 2

8 if switch for while do while 2 (Basic Theory of Information Processing) ( ) if for while break continue 1 8 if switch for while do while 2 8.1 if (p.52) 8.1.1 if 1 if ( ) 2; 3 1 true 2 3 false 2 3 3 8.1.2 if-else (p.54) if ( ) 1; else

More information

空き容量一覧表(154kV以上)

空き容量一覧表(154kV以上) 1/3 A. 電気所 ( 発電所, 変電所, 配電塔 ) における変圧器の空き容量 覧 < 留意事項 > (1) 空容量は 安であり 系統接続の前には 接続検討のお申込みによる詳細検討が必要となります その結果 空容量が変更となる場合があります (2) 熱容量を考慮した空き容量を記載しております その他の要因 ( や系統安定度など ) で連系制約が発 する場合があります (3) 表 は 既に空容量がないため

More information

2/8 一次二次当該 42 AX 変圧器 なし 43 AY 変圧器 なし 44 BA 変圧器 なし 45 BB 変圧器 なし 46 BC 変圧器 なし

2/8 一次二次当該 42 AX 変圧器 なし 43 AY 変圧器 なし 44 BA 変圧器 なし 45 BB 変圧器 なし 46 BC 変圧器 なし 1/8 A. 電気所 ( 発電所, 変電所, 配電塔 ) における変圧器の空き容量一覧 < 留意事項 > (1) 空容量は目安であり 系統接続の前には 接続検討のお申込みによる詳細検討が必要となります その結果 空容量が変更となる場合があります (2) 特に記載のない限り 熱容量を考慮した空き容量を記載しております その他の要因 ( や系統安定度など ) で連系制約が発生する場合があります (3)

More information

[ ] Table

[ ] Table [] Te P AP OP [] OP c r de,,,, ' ' ' ' de,, c,, c, c ',, c mc ' ' m' c ' m m' OP OP p p p ( t p t p m ( m c e cd d e e c OP s( OP t( P s s t (, e e s t s 5 OP 5 5 s t t 5 OP ( 5 5 5 OAP ABP OBP ,, OP t(

More information

13 I/O

13 I/O 13 I/O 98-0997-3 14 2 7 Linux OS OS OS I/O I/O TS-I/O I/O I/O TS-I/O TS-I/O 3 1 7 2 9 2.1..................... 9 2.2.................. 10 2.3 2...................... 12 2.4 Linux................... 14

More information

MINI2440マニュアル

MINI2440マニュアル ARM Cortex-M3 STM32F103 (GCC TOPPERS/ASP ) http://www.nissin-tech.com info@nissin-tech.com 2009/10/15 copyright@2009 1 STM32F103...3 STM32...4...8 3.1...8 3.2...9 3.3...13 KEIL...19 4.1 KEIL...19 4.2...22

More information

L

L -G -VG -G -VG.MPa..MPa.1MPa..MPa 1.5MPa 1.5MPa 1.5MPa 1.5MPa 1 s 5 5 - -V 1.51MPa 1.5MPa s s..mpa.mpa 1.5MPa 1.5MPa - -V 1 s s 5 5 1 JISg/H 1. 1.5. 11 SLLBFFB SLLBFTC CCCCBTC..MPa 1.5MPa SLLBFFB CCCCBTC

More information

:30 12:00 I. I VI II. III. IV. a d V. VI

:30 12:00 I. I VI II. III. IV. a d V. VI 2018 2018 08 02 10:30 12:00 I. I VI II. III. IV. a d V. VI. 80 100 60 1 I. Backus-Naur BNF N N y N x N xy yx : yxxyxy N N x, y N (parse tree) (1) yxyyx (2) xyxyxy (3) yxxyxyy (4) yxxxyxxy N y N x N yx

More information

untitled

untitled PC murakami@cc.kyushu-u.ac.jp muscle server blade server PC PC + EHPC/Eric (Embedded HPC with Eric) 1216 Compact PCI Compact PCIPC Compact PCISH-4 Compact PCISH-4 Eric Eric EHPC/Eric EHPC/Eric Gigabit

More information

Java updated

Java updated Java 2003.07.14 updated 3 1 Java 5 1.1 Java................................. 5 1.2 Java..................................... 5 1.3 Java................................ 6 1.3.1 Java.......................

More information

18 C ( ) hello world.c 1 #include <stdio.h> 2 3 main() 4 { 5 printf("hello World\n"); 6 } [ ] [ ] #include <stdio.h> % cc hello_world.c %./a.o

18 C ( ) hello world.c 1 #include <stdio.h> 2 3 main() 4 { 5 printf(hello World\n); 6 } [ ] [ ] #include <stdio.h> % cc hello_world.c %./a.o 18 C ( ) 1 1 1.1 hello world.c 5 printf("hello World\n"); 6 } [ ] [ ] #include % cc hello_world.c %./a.out Hello World [a.out ] % cc hello_world.c -o hello_world [ ( ) ] (K&R 4.1.1) #include

More information

T T T T A 0 1 A 1 A P (A 1 ) = C 1 6 C 8C 3 = 15 8, P (A ) = C 6 C 1 8C 3 = 3 8 T 5 B P (A 1 B) = =

T T T T A 0 1 A 1 A P (A 1 ) = C 1 6 C 8C 3 = 15 8, P (A ) = C 6 C 1 8C 3 = 3 8 T 5 B P (A 1 B) = = 4 1.. 3. 4. 1. 1 3 4 5 6 1 3 4 5 6. 1 1 1 A B P (A B) = P (A) + P (B) P (C) = P (A) P (B) 3. 1 1 P (A) = 1 P (A) A A 4. A B P A (B) = n(a B) n(a) = P (A B) P (A) 50 015 016 018 1 4 5 8 8 3 T 1 3 1 T T

More information

新・明解C言語 実践編

新・明解C言語 実践編 第 1 章 見 21 1-1 見えないエラー 見 List 1-1 "max2x1.h" a, b max2 List 1-1 chap01/max2x1.h max2 "max2x1.h" #define max2(a, b) ((a) > (b)? (a) : (b)) max2 List 1-2 List 1-2 chap01/max2x1test.c max2 #include

More information

A/B (2018/06/08) Ver kurino/2018/soft/soft.html A/B

A/B (2018/06/08) Ver kurino/2018/soft/soft.html A/B A/B (2018/06/08) Ver. 1.0 kurino@math.cst.nihon-u.ac.jp http://edu-gw2.math.cst.nihon-u.ac.jp/ kurino/2018/soft/soft.html 2018 6 8 A/B 1 2018 6 8 2 1 1 1.1 OHP.................................... 1 1.2

More information

(1) (2) (1) (2) 2 3 {a n } a 2 + a 4 + a a n S n S n = n = S n

(1) (2) (1) (2) 2 3 {a n } a 2 + a 4 + a a n S n S n = n = S n . 99 () 0 0 0 () 0 00 0 350 300 () 5 0 () 3 {a n } a + a 4 + a 6 + + a 40 30 53 47 77 95 30 83 4 n S n S n = n = S n 303 9 k d 9 45 k =, d = 99 a d n a n d n a n = a + (n )d a n a n S n S n = n(a + a n

More information

Cコンパイラパッケージお知らせ

Cコンパイラパッケージお知らせ 201406-2 CubeSuite+ 版 RX ファミリ用 C/C++ コンパイラパッケージ V1 および High-performance Embedded Workshop 版 RX ファミリ用 C/C++ コンパイラパッケージ ご使用上のお願い CubeSuite+ 版 RX ファミリ用 C/C++ コンパイラパッケージ V1 および High-performance Embedded Workshop

More information

C ( ) C ( ) C C C C C 1 Fortran Character*72 name Integer age Real income 3 1 C mandata mandata ( ) name age income mandata ( ) mandat

C ( ) C ( ) C C C C C 1 Fortran Character*72 name Integer age Real income 3 1 C mandata mandata ( ) name age income mandata ( ) mandat C () 14 5 23 C () C C C C C 1 Fortran Character*72 name Integer age Real income 3 1 C 1.1 3 7 mandata mandata () name age income mandata () mandata1 1 #include struct mandata char name[51];

More information

ex01.dvi

ex01.dvi ,. 0. 0.0. C () /******************************* * $Id: ex_0_0.c,v.2 2006-04-0 3:37:00+09 naito Exp $ * * 0. 0.0 *******************************/ #include int main(int argc, char **argv) double

More information

Microsoft Word - Training10_プリプロセッサ.docx

Microsoft Word - Training10_プリプロセッサ.docx Training 10 プリプロセッサ 株式会社イーシーエス出版事業推進委員会 1 Lesson1 マクロ置換 Point マクロ置換を理解しよう!! マクロ置換の機能により 文字列の置き換えをすることが出来ます プログラムの可読性と保守性 ( メンテナンス性 ) を高めることができるため よく用いられます マクロ置換で値を定義しておけば マクロの値を変更するだけで 同じマクロを使用したすべての箇所が変更ができるので便利です

More information

GPU CUDA CUDA 2010/06/28 1

GPU CUDA CUDA 2010/06/28 1 GPU CUDA CUDA 2010/06/28 1 GPU NVIDIA Mark Harris, Optimizing Parallel Reduction in CUDA http://developer.download.nvidia.com/ compute/cuda/1_1/website/data- Parallel_Algorithms.html#reduction CUDA SDK

More information

ACE Associated Computer Experts bv

ACE Associated Computer Experts bv CoSy Application CoSy Marcel Beemster/Yoichi Sugiyama ACE Associated Compiler Experts & Japan Novel Corporation contact: yo_sugi@jnovel.co.jp Parallel Architecture 2 VLIW SIMD MIMD 3 MIMD HW DSP VLIW/ILP

More information

main

main 14 1. 12 5 main 1.23 3 1.230000 3 1.860867 1 2. 1988 1925 1911 1867 void JPcalendar(int x) 1987 1 64 1 1 1 while(1) Ctrl C void JPcalendar(int x){ if (x > 1988) printf(" %d %d \n", x, x-1988); else if(x

More information

Microsoft PowerPoint - program.ppt [互換モード]

Microsoft PowerPoint - program.ppt [互換モード] プログラミング演習 バージョン 1 担当教員 : 綴木馴 プログラムの決まりについて学ぶ おすすめする参考書 ザ C 戸川隼人サイエンス社 本日の予定 1. 授業の説明. 2. コンパイラーのインストール. プログラムの決まりについて学ぶ,P31 /* The most in C */ /* hello.c */ printf("hello,world n"); プログラムの決まり ( コメント )

More information

gusa: Simple and Efficient User Space Atomicity Emulation with Little Kernel Modification g (AIST) , gusa( g User Space Ato

gusa: Simple and Efficient User Space Atomicity Emulation with Little Kernel Modification g (AIST) , gusa( g User Space Ato gusa: Simple and Efficient User Space Atomicity Emulation with Little Kernel Modification g (AIST) 2002 9 19, gusa( g User Space Atomicity),, gusa,, gusa, General ( ), Generic ( ), Gentle

More information

:30 12:00 I. I VI II. III. IV. a d V. VI

:30 12:00 I. I VI II. III. IV. a d V. VI 2017 2017 08 03 10:30 12:00 I. I VI II. III. IV. a d V. VI. 80 100 60 1 I. Backus-Naur BNF X [ S ] a S S ; X X X, S [, a, ], ; BNF X (parse tree) (1) [a;a] (2) [[a]] (3) [a;[a]] (4) [[a];a] : [a] X 2 222222

More information

B. 41 II: 2 ;; 4 B [ ] S 1 S 2 S 1 S O S 1 S P 2 3 P P : 2.13:

B. 41 II: 2 ;; 4 B [ ] S 1 S 2 S 1 S O S 1 S P 2 3 P P : 2.13: B. 41 II: ;; 4 B [] S 1 S S 1 S.1 O S 1 S 1.13 P 3 P 5 7 P.1:.13: 4 4.14 C d A B x l l d C B 1 l.14: AB A 1 B 0 AB 0 O OP = x P l AP BP AB AP BP 1 (.4)(.5) x l x sin = p l + x x l (.4)(.5) m d A x P O

More information

Java学習教材

Java学習教材 Java 2016/4/17 Java 1 Java1 : 280 : (2010/1/29) ISBN-10: 4798120987 ISBN-13: 978-4798120980 2010/1/29 1 Java 1 Java Java Java class FirstExample { public static void main(string[] args) { System.out.println("

More information

2012 A, N, Z, Q, R, C

2012 A, N, Z, Q, R, C 2012 A, N, Z, Q, R, C 1 2009 9 2 2011 2 3 2012 9 1 2 2 5 3 11 4 16 5 22 6 25 7 29 8 32 1 1 1.1 3 1 1 1 1 1 1? 3 3 3 3 3 3 3 1 1, 1 1 + 1 1 1+1 2 2 1 2+1 3 2 N 1.2 N (i) 2 a b a 1 b a < b a b b a a b (ii)

More information

21 B92 B92 Quantum cryptography simulator

21 B92 B92 Quantum cryptography simulator 21 B92 B92 Quantum cryptography simulator 1100348 2010 3 1 B92 BB84 BB84 E91 B92 2 3 B92 4 3 5 B92, i Abstract B92 Quantum cryptography simulator Soichiro MATSUMOTO English Nowadays, the public key cryptosystem

More information

目次 目次... 1 はじめに... 3 マイコンシミュレータのデバッグ機能... 3 スタートアップコマンドファイル... 5 シミュレータコマンド ( マクロ ) 例... 6 I/O 制御等で外的要因待ちをしている場合 ( その1)... 6 I/O 制御等で外的要因待ちをしている場合 ( そ

目次 目次... 1 はじめに... 3 マイコンシミュレータのデバッグ機能... 3 スタートアップコマンドファイル... 5 シミュレータコマンド ( マクロ ) 例... 6 I/O 制御等で外的要因待ちをしている場合 ( その1)... 6 I/O 制御等で外的要因待ちをしている場合 ( そ マクロ ( シミュレータコマンド ) の使い方 2017 年 05 月 11 日第 1.4.3 版 - 1 - 目次 目次... 1 はじめに... 3 マイコンシミュレータのデバッグ機能... 3 スタートアップコマンドファイル... 5 シミュレータコマンド ( マクロ ) 例... 6 I/O 制御等で外的要因待ちをしている場合 ( その1)... 6 I/O 制御等で外的要因待ちをしている場合

More information

高校生の就職への数学II

高校生の就職への数学II II O Tped b L A TEX ε . II. 3. 4. 5. http://www.ocn.ne.jp/ oboetene/plan/ 7 9 i .......................................................................................... 3..3...............................

More information

High-performance Embedded Workshop V.4.09 リリースノート

High-performance Embedded Workshop V.4.09 リリースノート R20UT2059JJ0100 Rev.1.00 High-performance Embedded Workshop 1.... 2 1.1... 2 1.2... 2 1.3... 3 1.4... 5 1.5... 6 1.6... 7 1.7... 7 1.8... 7 1.9... 7 1.10... 7 1.11... 8 1.12... 8 1.13... 8 1.14... 8 1.15...

More information

卒 業 研 究 報 告.PDF

卒 業 研 究 報 告.PDF C 13 2 9 1 1-1. 1-2. 2 2-1. 2-2. 2-3. 2-4. 3 3-1. 3-2. 3-3. 3-4. 3-5. 3-5-1. 3-5-2. 3-6. 3-6-1. 3-6-2. 4 5 6 7-1 - 1 1 1-1. 1-2. ++ Lisp Pascal Java Purl HTML Windows - 2-2 2 2-1. 1972 D.M. (Dennis M Ritchie)

More information

I ASCII ( ) NUL 16 DLE SP P p 1 SOH 17 DC1! 1 A Q a q STX 2 18 DC2 " 2 B R b

I ASCII ( ) NUL 16 DLE SP P p 1 SOH 17 DC1! 1 A Q a q STX 2 18 DC2  2 B R b I 4 003 4 30 1 ASCII ( ) 0 17 0 NUL 16 DLE SP 0 @ P 3 48 64 80 96 11 p 1 SOH 17 DC1! 1 A Q a 33 49 65 81 97 113 q STX 18 DC " B R b 34 50 66 8 98 114 r 3 ETX 19 DC3 # 3 C S c 35 51 67 83 99 115 s 4 EOT

More information

マクロ(シミュレータコマンド)の使い方

マクロ(シミュレータコマンド)の使い方 マクロ ( シミュレータコマンド ) の使い方 2014 年 11 月 04 日第 1.4.0 版 - 1 - 目次 目次... 1 はじめに... 3 マイコンシミュレータのデバッグ機能... 3 スタートアップコマンドファイル... 5 シミュレータコマンド ( マクロ ) 例... 6 I/O 制御等で外的要因待ちをしている場合 ( その1)... 6 I/O 制御等で外的要因待ちをしている場合

More information

( )

( ) 18 10 01 ( ) 1 2018 4 1.1 2018............................... 4 1.2 2018......................... 5 2 2017 7 2.1 2017............................... 7 2.2 2017......................... 8 3 2016 9 3.1 2016...............................

More information

QR

QR 1 7 16 13 1 13.1 QR...................................... 2 13.1.1............................................ 2 13.1.2..................................... 3 13.1.3 QR........................................

More information

新コンフィギュレータのフレームワークについて

新コンフィギュレータのフレームワークについて : 2007 12 7 6: 2009 5 9 TOPPERS 1.... 4 1.1... 4 1.2 TOPPERS... 4 2.... 4 2.1... 4 3.... 8 4.... 9 4.1... 9 4.2... 10 4.3... 10 4.3.1... 11 4.3.2 INCLUDE... 11 4.3.3 C... 12 4.4 API... 14 4.2.1 API...

More information

ex12.dvi

ex12.dvi 1 0. C, char., char, 0,. C, ("),., char str[]="abc" ; str abc.,, str 4. str 3. char str[10]="abc" ;, str 10, str 3., char s[]="abc", t[10] ;, t = s. ASCII, 0x00 0x7F, char., "abc" 3, 1. 1 8 256, 2., 2

More information

Microsoft Word - keisankigairon.ch doc

Microsoft Word - keisankigairon.ch doc 1000000100001010 1000001000001011 0100001100010010 1010001100001100 load %r1,10 load %r2,11 add %r3,%r1,%r2 store %r3,12 k = i + j ; = > (* 1 2 3 4 5 6 7 8 9 10) 3628800 DO 3 I=1,3 DO3I=1.3 DO3I 1.3

More information

ex01.dvi

ex01.dvi ,. 0. 0.0. C () /******************************* * $Id: ex_0_0.c,v.2 2006-04-0 3:37:00+09 naito Exp $ * * 0. 0.0 *******************************/ #include int main(int argc, char **argv) { double

More information

Intel Memory Protection Extensions(Intel MPX) x86, x CPU skylake 2015 Intel Software Development Emulator 本資料に登場する Intel は Intel Corp. の登録

Intel Memory Protection Extensions(Intel MPX) x86, x CPU skylake 2015 Intel Software Development Emulator 本資料に登場する Intel は Intel Corp. の登録 Monthly Research Intel Memory Protection Extensions http://www.ffri.jp Ver 1.00.01 1 Intel Memory Protection Extensions(Intel MPX) x86, x86-64 2015 2 CPU skylake 2015 Intel Software Development Emulator

More information

201908計算

201908計算 立命館大学大学院 2018 年度実施入学試験 博士課程前期課程 情報理工学研究科情報理工学専攻 入試方式コース実施月 ページ 専門科目 備考 一般入学試験 8 月 P.1~ 2 月 P.16~ 社会人入学試験 8 月 2 月 外国人留学生入学試験 ( 日本語基準 ) 計算機科学 7 月 (2018 年 9 月入学 ) 8 月 2 月 学内進学入学試験 7 月 (2018 年 9 月入学 ) 7 月

More information

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裵²ó ¨¡ À©¸æ¹½Â¤¡§¾ò·ïʬ´ô ¨¡

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裵²ó  ¨¡ À©¸æ¹½Â¤¡§¾ò·ïʬ´ô ¨¡ (2018) 2018 5 17 0 0 if switch if if ( ) if ( 0) if ( ) if ( 0) if ( ) (0) if ( 0) if ( ) (0) ( ) ; if else if ( ) 1 else 2 if else ( 0) 1 if ( ) 1 else 2 if else ( 0) 1 if ( ) 1 else 2 (0) 2 if else

More information

gengo1-2

gengo1-2 変数 プログラム中で 値を格納するには変数 variable を用いる変数は 格納する値の型によって 整数型 文字型 などの型 type をもつ変数を使うには 利用に先立って変数の宣言 declaration をしなければならない 値 変数の値はコンピュータのメモリ上に格納される 具体的にメモリのどの場所に格納されるかは言語処理系が自動的に扱うので プログラマ ( 特に初級者 ) が意識する必要はない

More information

Condition DAQ condition condition 2 3 XML key value

Condition DAQ condition condition 2 3 XML key value Condition DAQ condition 2009 6 10 2009 7 2 2009 7 3 2010 8 3 1 2 2 condition 2 3 XML key value 3 4 4 4.1............................. 5 4.2...................... 5 5 6 6 Makefile 7 7 9 7.1 Condition.h.............................

More information

A04-133 21 2 9 1 3 1.1.......................................... 3 1.2..................................... 3 1.3................................... 4 2 5 2.1.................................... 5 2.2...............................

More information

c-all.dvi

c-all.dvi III(994) (994) from PSL (9947) & (9922) c (99,992,994,996) () () 2 3 4 (2) 2 Euler 22 23 Euler 24 (3) 3 32 33 34 35 Poisson (4) 4 (5) 5 52 ( ) 2 Turbo 2 d 2 y=dx 2 = y y = a sin x + b cos x x = y = Fortran

More information

1.1 1 C IIA $ cd comp3a %endminipage ~/comp3a mkdir $ mkdir comp3a $ cd comp3a C.c Emacs Cntrol x Control s 2 Emacs Control-x Control-f Control-

1.1 1 C IIA $ cd comp3a %endminipage ~/comp3a mkdir $ mkdir comp3a $ cd comp3a C.c Emacs Cntrol x Control s 2 Emacs Control-x Control-f Control- 1 C IIA 1 C IIA IIA 1.1 Mac OS X 1.1.1 Mac OS X Unicode(UTF-8) UTF-8 Jedit X( ) Emacs( ) Emacs Emacs Emacs [Finder] [] Emacs dock Jedit X C 1. Jedit X Dock drag & drop Jedit X [Finder] [] Jedit X Folder

More information

DA100データアクイジションユニット通信インタフェースユーザーズマニュアル

DA100データアクイジションユニット通信インタフェースユーザーズマニュアル Instruction Manual Disk No. RE01 6th Edition: November 1999 (YK) All Rights Reserved, Copyright 1996 Yokogawa Electric Corporation 801234567 9 ABCDEF 1 2 3 4 1 2 3 4 1 2 3 4 1 2

More information

r1.dvi

r1.dvi 2014 1 2014.4.10 0 / 1 / 2 / 3 Lisp 4 5 ( ) 1 (5 1 ) 5 1 1.1? 0 1 (bit sequence) 5 101 3 11 2 (binary system) 2 1000 8 1 ( ) ( )? ( 1) r1 1000 1001 r2 1002... r3 1: (memory) (address) CPU (instruction)

More information

XACC講習会

XACC講習会 www.xcalablemp.org 1 4, int array[max]; #pragma xmp nodes p(*) #pragma xmp template t(0:max-1) #pragma xmp distribute t(block) onto p #pragma xmp align array[i] with t(i) int array[max]; main(int argc,

More information

program.dvi

program.dvi 2001.06.19 1 programming semi ver.1.0 2001.06.19 1 GA SA 2 A 2.1 valuename = value value name = valuename # ; Fig. 1 #-----GA parameter popsize = 200 mutation rate = 0.01 crossover rate = 1.0 generation

More information