<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>C51 &amp;#39;in-line&amp;#39; compilation</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/14503/c51-in-line-compilation</link><description> Hi! 
 
I&amp;#39;ve a particular module within a large project in which I wish to avoid making jumps to code segments from other modules (including C51 library code). 
Is there a means by which I can ensure that the compilation of this module will expand any</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: C51 'in-line' compilation</title><link>https://community.arm.com/thread/121656?ContentTypeID=1</link><pubDate>Mon, 03 Dec 2001 11:40:35 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3561dff6-8db8-45f9-a23f-c5c1eb97a741</guid><dc:creator>Jon Ward</dc:creator><description>&lt;p&gt;Those routines are helper routines and they are not included inline.  Refer to&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.keil.com/support/docs/1964.htm"&gt;http://www.keil.com/support/docs/1964.htm&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
for a little more information about what the routines do and how to &amp;quot;decode&amp;quot; the function names.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Jon&lt;/b&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: C51 'in-line' compilation</title><link>https://community.arm.com/thread/109904?ContentTypeID=1</link><pubDate>Mon, 03 Dec 2001 04:32:22 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:608d78bd-0461-4a97-a8ab-f3e6a2378d0b</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;i&gt;This is only true for the _chkfloat_, _lrol_, and _lror_ functions.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Guess which ones I was using, then...  ;-)&lt;br /&gt;
&lt;br /&gt;
When will the manual be corrected?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: C51 'in-line' compilation</title><link>https://community.arm.com/thread/109917?ContentTypeID=1</link><pubDate>Mon, 03 Dec 2001 02:57:11 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:643928d9-7597-4bbd-9c1f-1c986766133f</guid><dc:creator>David  Fussell</dc:creator><description>&lt;p&gt;Okay. The lib. functions that my &amp;#39;c&amp;#39; module require are LSTIDATA ,LLDIDATA and similar, they aren&amp;#39;t inlined when the CODE(SPEED) option is specified. I guess my only means of inlining these is to do it manually. &lt;br /&gt;
&lt;br /&gt;
Thanks for your comments.&lt;br /&gt;
&lt;br /&gt;
David&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: C51 'in-line' compilation</title><link>https://community.arm.com/thread/94885?ContentTypeID=1</link><pubDate>Sun, 02 Dec 2001 17:38:52 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:dee71768-ef8d-4e6e-9114-0257c99c92e3</guid><dc:creator>Jon Ward</dc:creator><description>&lt;p&gt;&lt;i&gt;In particular, note that the manual is incorrect when it says that the intrinsic functions are inserted inline: this is not true - they are called just like any other function.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
This is only true for the &lt;b&gt;_chkfloat_&lt;/b&gt;, &lt;b&gt;_lrol_&lt;/b&gt;, and &lt;b&gt;_lror_&lt;/b&gt; functions.&lt;br /&gt;
&lt;br /&gt;
The &lt;b&gt;_crol_&lt;/b&gt;, &lt;b&gt;_cror_&lt;/b&gt;, &lt;b&gt;_irol_&lt;/b&gt;, &lt;b&gt;_iror_&lt;/b&gt;, &lt;b&gt;_nop_&lt;/b&gt;, and &lt;b&gt;_testbit_&lt;/b&gt; routines are implemented as explicit instructions.  For example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;
;---- Variable &amp;#39;i?042&amp;#39; assigned to Register &amp;#39;R2/R3&amp;#39; ----
;---- Variable &amp;#39;c?041&amp;#39; assigned to Register &amp;#39;R1&amp;#39; ----
; {
			; SOURCE LINE # 6
; float f;
; unsigned char c;
; unsigned int i;
; unsigned long l;
; 
; bit b;
; 
; if (_chkfloat_ (f))
			; SOURCE LINE # 14
	MOV  	R7,f?040+03H
	MOV  	R6,f?040+02H
	MOV  	R5,f?040+01H
	MOV  	R4,f?040
	LCALL	?C?CHKFLOAT
	JZ   	?C0001
;   {
			; SOURCE LINE # 15
;   f = 0.0;
			; SOURCE LINE # 16
	CLR  	A
	MOV  	f?040+03H,A
	MOV  	f?040+02H,A
	MOV  	f?040+01H,A
	MOV  	f?040,A
;   }
			; SOURCE LINE # 17
?C0001:
; 
; c = _crol_ (c, 3);
			; SOURCE LINE # 19
	MOV  	R0,#03H
	MOV  	R7,AR1
	MOV  	A,R7
	INC  	R0
	SJMP 	?C0007
?C0006:
	RL   	A
?C0007:
	DJNZ 	R0,?C0006
	MOV  	R1,A
; c = _cror_ (c, 4);
			; SOURCE LINE # 20
	MOV  	R0,#04H
	MOV  	R7,A
	INC  	R0
	SJMP 	?C0009
?C0008:
	RR   	A
?C0009:
	DJNZ 	R0,?C0008
	MOV  	R1,A
; 
; i = _irol_ (i, 3);
			; SOURCE LINE # 22
	MOV  	R0,#03H
	MOV  	R7,AR3
	MOV  	R6,AR2
	MOV  	A,R7
	INC  	R0
	SJMP 	?C0011
?C0010:
	RLC  	A
	XCH  	A,R6
	RLC  	A
	XCH  	A,R6
	MOV  	ACC.0,C
?C0011:
	DJNZ 	R0,?C0010
	MOV  	R2,AR6
	MOV  	R3,A
; i = _iror_ (i, 4);
			; SOURCE LINE # 23
	MOV  	R0,#04H
	MOV  	R7,A
	INC  	R0
	SJMP 	?C0013
?C0012:
	MOV  	C,ACC.0
	XCH  	A,R6
	RRC  	A
	XCH  	A,R6
	RRC  	A
?C0013:
	DJNZ 	R0,?C0012
	MOV  	R2,AR6
	MOV  	R3,A
; 
; l = _lrol_ (l, 3);
			; SOURCE LINE # 25
	MOV  	R7,l?043+03H
	MOV  	R6,l?043+02H
	MOV  	R5,l?043+01H
	MOV  	R4,l?043
	MOV  	R0,#03H
	LCALL	?C?LROL
	MOV  	l?043+03H,R7
	MOV  	l?043+02H,R6
	MOV  	l?043+01H,R5
	MOV  	l?043,R4
; l = _lror_ (l, 4);
			; SOURCE LINE # 26
	MOV  	R0,#04H
	LCALL	?C?LROR
	MOV  	l?043+03H,R7
	MOV  	l?043+02H,R6
	MOV  	l?043+01H,R5
	MOV  	l?043,R4
; 
; _nop_ ();
			; SOURCE LINE # 28
	NOP  	
; 
; if (_testbit_ (b))
			; SOURCE LINE # 30
	JBC  	b?044,?C0015
	SJMP 	?C0003
?C0015:
;   {
			; SOURCE LINE # 31
;   b = 1;
			; SOURCE LINE # 32
	SETB 	b?044
;   }
			; SOURCE LINE # 33
?C0003:
; 
; while (1);
			; SOURCE LINE # 35
	SJMP 	?C0003
; END OF main
&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Jon&lt;/b&gt;&lt;br /&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: C51 'in-line' compilation</title><link>https://community.arm.com/thread/53985?ContentTypeID=1</link><pubDate>Fri, 30 Nov 2001 15:55:49 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2bd490eb-41f2-4e32-82d9-91a40fdc7030</guid><dc:creator>Andrew Neil</dc:creator><description>&lt;p&gt;but this does &lt;b&gt;not&lt;/b&gt; mean that it will make function calls inline.&lt;br /&gt;
&lt;br /&gt;
C51 does not have a #pragma inline.&lt;br /&gt;
&lt;br /&gt;
In particular, note that the manual is &lt;b&gt;incorrect&lt;/b&gt; when it says that the &lt;i&gt;intrinsic&lt;/i&gt; functions are inserted inline: this is not true - they &lt;b&gt;are&lt;/b&gt; called just like any other function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: C51 'in-line' compilation</title><link>https://community.arm.com/thread/38090?ContentTypeID=1</link><pubDate>Fri, 30 Nov 2001 09:05:35 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9a36dbef-ddae-41e6-9785-48f6fc69787c</guid><dc:creator>Keil  Support Intl.</dc:creator><description>&lt;p&gt;Yes, C51 provides you with the OPTIMIZE (SPEED) directive.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>