Index: asp3_wo_tecs/trunk/arch/arm_gcc/doc/arm_design.txt
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/doc/arm_design.txt	(revision 302)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/doc/arm_design.txt	(revision 306)
@@ -3,7 +3,60 @@
 		ARMã³ã¢ä¾å­é¨ è¨­è¨ã¡ã¢
 
-		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.B.0
-		æçµæ´æ°: 2015å¹´8æ18æ¥
-
+		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.1.0
+		æçµæ´æ°: 2016å¹´5æ14æ¥
+
+----------------------------------------------------------------------
+ TOPPERS/ASP Kernel
+     Toyohashi Open Platform for Embedded Real-Time Systems/
+     Advanced Standard Profile Kernel
+
+ Copyright (C) 2014-2016 by Embedded and Real-Time Systems Laboratory
+             Graduate School of Information Science, Nagoya Univ., JAPAN
+ 
+ ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+     æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+     ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+     ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+     è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+     ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+     ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+     ã¨ï¼
+   (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+       ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+   (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+       å ±åãããã¨ï¼
+ (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+     å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+     ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+     ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+     å
+è²¬ãããã¨ï¼
+ 
+ æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ ã®è²¬ä»»ãè² ããªãï¼
+ 
+ $Id: arm_design.txt 751 2016-05-14 15:03:06Z ertl-hiro $
 ----------------------------------------------------------------------
 
@@ -55,5 +108,8 @@
 ARMv7-Aï¼ARMv7-Rã«æºæ ãããã­ã»ããµã³ã¢ãæã¤ã¿ã¼ã²ããã·ã¹ãã ï¼ãã
 ãï¼ã«å
-±éã«ä½¿ç¨ã§ããé¨åã§ããï¼
+±éã«ä½¿ç¨ã§ããé¨åã§ããï¼ãã ãï¼ããã«è©²å½ãããã¹ã¦ã®ARMã³ã¢
+ã«å¯¾å¿ã§ãã¦ããããã§ã¯ãªãï¼æ°ãããããã«ãã¼ãã£ã³ã°ããéã«ã¯ï¼ã³
+ã¢ä¾å­é¨ã«ä½ããã®ä¿®æ­£ãå¿
+è¦ã«ãªããã¨ãå¤ãã¨æãããï¼
 
 ARMã³ã¢ã®ãã­ã»ããµã³ã¢ç¥ç§°ã"arm"ã¨ããï¼GNUéçºç°å¢åãã®ARMã³ã¢ä¾å­
@@ -284,11 +340,12 @@
 ã®cpsrãspsrã«å¾©å¸° */
 	msr		spsr_cxsf, r0
-	ldmfd	sp!, {r0-r4,r12,lr,pc}^		/* ä¾å¤å¦çããã®å¾©å¸° */
-----------------------------------------
-
-ããã§ï¼ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã«å ãã¦r4ãå¾©å¸°ãã¦ããã®ã¯ï¼ä¾å¤ã®åºå
-¥å£å¦
-çã§ã¹ã¯ã©ããã¬ã¸ã¹ã¿ä»¥å¤ã«ä½¿ããã¬ã¸ã¹ã¿ã¨ãã¦ï¼r4ãç¢ºä¿ããããã§ã
-ãï¼
+	ldmfd	sp!, {r0-r5,r12,lr,pc}^		/* ä¾å¤å¦çããã®å¾©å¸° */
+----------------------------------------
+
+ããã§ï¼ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã«å ãã¦r4ã¨r5ãå¾©å¸°ãã¦ããã®ã¯ï¼ä¾å¤ã®åºå
+¥
+å£å¦çã§ã¹ã¯ã©ããã¬ã¸ã¹ã¿ä»¥å¤ã«ä½¿ããã¬ã¸ã¹ã¿ã¨ãã¦ï¼r4ã¨r5ãç¢ºä¿ãã
+ããã§ããï¼å®éã«ã¯ï¼r4ã ããä½¿ããã°ååã§ãããï¼ã¹ã¿ãã¯ãã¤ã³ã¿ã
+8ãã¤ãå¢çã«ã¢ã©ã¤ã³ããããã«r5ãä¿å­ï¼å¾©å¸°ãã¦ããï¼ï¼
 
 ãã®åºå£ãå®è¡ããæç¹ã§ï¼ã¹ã¿ãã¯ã¯æ¬¡ã®ããã«ãªã£ã¦ããå¿
@@ -310,10 +367,12 @@
 	|       r4       |
 	+----------------+ <- sp+0x18
+	|       r5       |
+	+----------------+ <- sp+0x1c
 	|       r12      |
-	+----------------+ <- sp+0x1c
+	+----------------+ <- sp+0x20
 	|       lr       |
-	+----------------+ <- sp+0x20
+	+----------------+ <- sp+0x24
 	|    æ»ãçªå°    |
-	+----------------+
+	+----------------+ <- sp+0x28
 
 ããã«å¯¾å¿ããä¾å¤ã®å
@@ -325,5 +384,5 @@
 	 */
 	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_IRQ_BIT)
-	stmfd	sp!, {r0-r4,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */	(*1)
+	stmfd	sp!, {r0-r5,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */	(*1)
 
 	/*
@@ -339,5 +398,5 @@
 	 */
 	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_IRQ_BIT)
-	str		r2, [sp,#0x1c]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */		(*2)
+	str		r2, [sp,#0x20]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */		(*2)
 	push	{r1}					/* spsrãã¹ã¿ãã¯ã«ä¿å­ */
 ----------------------------------------
@@ -346,6 +405,6 @@
 ãï¼ãã®æç¹ã§ä¿å­ããpcã®å¤ã¯ä½¿ããªãï¼(*2)ã§ï¼ç¢ºä¿ããã¹ãã¼ã¹ã«æ»ã
 çªå°ãæ ¼ç´ããï¼æ ¼ç´å
-ã[sp,#0x1c]ã¨ããã®ã¯ï¼ãã®æç¹ã§ã¯spã¯ä¸ã®å³ã®
-ï¼sp+0x04ï¼ãæãã¦ããï¼æ»ãçªå°ã¯ï¼sp+0x20ï¼ã«æ ¼ç´ãããããã§ããï¼
+ã[sp,#0x20]ã¨ããã®ã¯ï¼ãã®æç¹ã§ã¯spã¯ä¸ã®å³ã®
+ï¼sp+0x04ï¼ãæãã¦ããï¼æ»ãçªå°ã¯ï¼sp+0x24ï¼ã«æ ¼ç´ãããããã§ããï¼
 
 ä¾å¤ãåãä»ããã¨Iããããã»ããããããï¼ä¾å¤ã®å
@@ -393,12 +452,13 @@
 
 ----------------------------------------
-	ldmfd	sp!, {r0-r4,r12,lr}
+	ldmfd	sp!, {r0-r5,r12,lr}
 	rfefd	sp!
 ----------------------------------------
 
-ããã§ï¼ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã«å ãã¦r4ãå¾©å¸°ãã¦ããã®ã¯ï¼ä¾å¤ã®åºå
-¥å£å¦
-çã§ã¹ã¯ã©ããã¬ã¸ã¹ã¿ä»¥å¤ã«ä½¿ããã¬ã¸ã¹ã¿ã¨ãã¦ï¼r4ãç¢ºä¿ããããã§ã
-ãï¼
+ããã§ï¼ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã«å ãã¦r4ã¨r5ãå¾©å¸°ãã¦ããã®ã¯ï¼ä¾å¤ã®åºå
+¥
+å£å¦çã§ã¹ã¯ã©ããã¬ã¸ã¹ã¿ä»¥å¤ã«ä½¿ããã¬ã¸ã¹ã¿ã¨ãã¦ï¼r4ã¨r5ãç¢ºä¿ãã
+ããã§ããï¼å®éã«ã¯ï¼r4ã ããä½¿ããã°ååã§ãããï¼ã¹ã¿ãã¯ãã¤ã³ã¿ã
+8ãã¤ãå¢çã«ã¢ã©ã¤ã³ããããã«r5ãä¿å­ï¼å¾©å¸°ãã¦ããï¼ï¼
 
 ãã®åºå£ãå®è¡ããæç¹ã§ï¼ã¹ã¿ãã¯ã¯æ¬¡ã®ããã«ãªã£ã¦ããå¿
@@ -418,12 +478,14 @@
 	|       r4       |
 	+----------------+ <- sp+0x14
+	|       r5       |
+	+----------------+ <- sp+0x18
 	|       r12      |
-	+----------------+ <- sp+0x18
+	+----------------+ <- sp+0x1c
 	|       lr       |
-	+----------------+ <- sp+0x1c
+	+----------------+ <- sp+0x20
 	|    æ»ãçªå°    |
-	+----------------+ <- sp+0x20
+	+----------------+ <- sp+0x24
 	|      cpsr      |
-	+----------------+
+	+----------------+ <- sp+0x28
 
 ããã«å¯¾å¿ããä¾å¤ã®å
@@ -443,5 +505,5 @@
 	 */
 	cps		#CPSR_SVC_MODE
-	stmfd	sp!, {r0-r4,r12,lr}
+	stmfd	sp!, {r0-r5,r12,lr}
 ----------------------------------------
 
@@ -585,11 +647,18 @@
 ä¸­ã§å¿
 è¦ãªæ
-å ±ï¼ä¾ãã°ï¼å²è¾¼ã¿çªå·ï¼ã¯ï¼irc_begin_intã§ã¹ã¿ãã¯ä¸ã«ä¿å­
-ãã¦ããå¿
-è¦ãããï¼ãããå¯è½ã«ããããã«ï¼irc_begin_intãå¼ã³åºããã
-ãï¼irc_end_intãå¿
-ãå¼ã³åºãããããã«ãã¦ããï¼ã¹ããªã¢ã¹å²è¾¼ã¿ã®å ´å
-ã«ãï¼irc_end_intãå¼ã³åºãããã«ãã¦ããï¼
-
+å ±ï¼ä¾ãã°ï¼å²è¾¼ã¿çªå·ï¼ã¯ï¼irc_begin_intã§ã¹ã¿ãã¯ã®å
+é ­ã«
+ä¿å­ãã¦ããå¿
+è¦ãããï¼ããã«ç¨ããããã«ï¼ã¹ã¿ãã¯ã®å
+é ­ã«1ã¯ã¼ãã®ç©º
+ãé åãè¨­ãã¦ããï¼
+
+irc_end_intã§å¿
+è¦ãªæ
+å ±ã1ã¯ã¼ãã§ä¸è¶³ããå ´åã«ã¯ï¼irc_begin_intã§ã¹ã¿ã
+ã¯ã«ç©ã¿ï¼irc_end_intã§ã¹ã¿ãã¯ããåãåºãï¼ãããå¯è½ã«ããããã«ï¼
+irc_begin_intãå¼ã³åºããããï¼irc_end_intãå¿
+ãå¼ã³åºãããããã«ãã¦
+ããï¼ã¹ããªã¢ã¹å²è¾¼ã¿ã®å ´åã«ãï¼irc_end_intãå¼ã³åºãããã«ãã¦ããï¼
 ãµãã«ã¼ãã³ï¼irc_begin_intï¼ã®ä¸­ã§ã¹ã¿ãã¯ã«ç©ã¿å¢ãã®ã¯ï¼ä¸è¬ã«ã¯æ¡ç¨
 ããªããã­ã°ã©ãã³ã°ææ³ã§ãããï¼irc_begin_intããirc_end_intã«æ¸¡ãæ
@@ -894,10 +963,5 @@
 å ±ãè¨æ¶ãã¦ããé åã®å
 é ­çªå°ãç¬¬1ãã©ã¡ã¼ã¿ï¼CPUä¾å¤ãã³ã
-ã©çªå·ãç¬¬2ãã©ã¡ã¼ã¿ã¨ãã¦å¼ã³åºãï¼r12ã«ä¿å­ããã¦ããCPUä¾å¤ã®æ
-å ±ã
-è¨æ¶ãã¦ããé åã®å
-é ­çªå°ãä¿å­ãããããã«ï¼å¿
-è¦ã«å¿ãã¦ï¼ã¹ã¿ãã¯ã«
-ä¿å­ããï¼
+ã©çªå·ãç¬¬2ãã©ã¡ã¼ã¿ã¨ãã¦å¼ã³åºãï¼
 
 ----------------------------------------
@@ -919,7 +983,7 @@
 ã¯ã«æ»ãï¼ãã®å¾ï¼CPUä¾å¤ãçºçããç¶æ³ãå¤æ­ããããã®è¿½å æ
 å ±ãã¹ã¿ã
-ã¯ä¸ããæ¨ã¦ãï¼ä¾å¤ãã¹ãã«ã¦ã³ãã0ã«ãªã£ãå ´åã®å¦çã¯ï¼å²è¾¼ã¿ãã³ã
-ã©ã®åºå£å¦çã¨å
-±éã§ããããï¼ret_int_1ã«åå²ããï¼
+ã¯ä¸ããæ¨ã¦ãï¼ä¾å¤ãã¹ãã«ã¦ã³ãã0ã«ãªã£ãå ´åã®å¦çã¯ï¼è¿½å æ
+å ±ãã¹
+ã¿ãã¯ä¸ããæ¨ã¦ããã¨ä»¥å¤ã¯ï¼å²è¾¼ã¿ãã³ãã©ã®åºå£å¦çã¨åæ§ã§ããï¼
 
 ----------------------------------------
@@ -957,9 +1021,4 @@
 #endif /* TOPPERS_SUPPORT_OVRHDR */
 		}
-----------------------------------------
-
-ä»¥ä¸ã®å¦çã«ã¯ï¼å²è¾¼ã¿ãã³ãã©ã®åºå£å¦çã®ã«ã¼ãã³ãæµç¨ããï¼
-
-----------------------------------------
 		CPUä¾å¤å¦çããã®ãªã¿ã¼ã³å¾ã«ï¼CPUã­ãã¯è§£é¤ç¶æ
 ã«æ»ãããã«æºåãã
@@ -972,6 +1031,4 @@
 ----------------------------------------
 
-ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãå¾©å¸°ããå¾ï¼ä¾å¤ãããªã¿ã¼ã³ããï¼
-
 âã¹ã¿ãã¯ãã¤ã³ã¿ãä¸æ­£ã®å ´åã®å¯¾ç­
 
