Mercurial > hg > index.cgi
comparison docs/manual/x628.html @ 347:330a66a0f45a
Document the forwardrefmax pragma
Since the forwardrefmax is useful for combatting huge assembly times in many
sources, actually document it so people can find it.
author | William Astle <lost@l-w.ca> |
---|---|
date | Thu, 09 Apr 2015 12:51:02 -0600 |
parents | 507f442dc71e |
children |
comparison
equal
deleted
inserted
replaced
346:9e35f7a1fca1 | 347:330a66a0f45a |
---|---|
15 REL="PREVIOUS" | 15 REL="PREVIOUS" |
16 TITLE="Object Files and Sections" | 16 TITLE="Object Files and Sections" |
17 HREF="x564.html"><LINK | 17 HREF="x564.html"><LINK |
18 REL="NEXT" | 18 REL="NEXT" |
19 TITLE="LWLINK" | 19 TITLE="LWLINK" |
20 HREF="c727.html"></HEAD | 20 HREF="c734.html"></HEAD |
21 ><BODY | 21 ><BODY |
22 CLASS="SECTION" | 22 CLASS="SECTION" |
23 BGCOLOR="#FFFFFF" | 23 BGCOLOR="#FFFFFF" |
24 TEXT="#000000" | 24 TEXT="#000000" |
25 LINK="#0000FF" | 25 LINK="#0000FF" |
57 ><TD | 57 ><TD |
58 WIDTH="10%" | 58 WIDTH="10%" |
59 ALIGN="right" | 59 ALIGN="right" |
60 VALIGN="bottom" | 60 VALIGN="bottom" |
61 ><A | 61 ><A |
62 HREF="c727.html" | 62 HREF="c734.html" |
63 ACCESSKEY="N" | 63 ACCESSKEY="N" |
64 >Next</A | 64 >Next</A |
65 ></TD | 65 ></TD |
66 ></TR | 66 ></TR |
67 ></TABLE | 67 ></TABLE |
338 a symbol.</P | 338 a symbol.</P |
339 ><P | 339 ><P |
340 >It is important to note that if a symbol is defined but it does not | 340 >It is important to note that if a symbol is defined but it does not |
341 yet evaluate to a constant value at the point where the conditional appears, | 341 yet evaluate to a constant value at the point where the conditional appears, |
342 the assembler will still complain about a non constant condition.</P | 342 the assembler will still complain about a non constant condition.</P |
343 ></DD | |
344 ><DT | |
345 >forwardrefmax</DT | |
346 ><DD | |
347 ><P | |
348 >This pragma will disable forward reference optimization completely. | |
349 Ordinarily, LWASM will attempt to select the shortest possible addressing | |
350 mode for forward references. However, in many source files, especially | |
351 those not using the PCR relative addressing modes, this optimization is | |
352 pointless since the assembler will almost certainly settle on a 16 bit | |
353 offset or address. If all variables in the direct page are defined before | |
354 the main body of the code, the benefit of forward reference optimization | |
355 almost certainly vanishes completely. However, the cost of doing that | |
356 optimization remains and can result in a very long assembly time.</P | |
357 ><P | |
358 >Enabling this pragma will cause all forward references to use the | |
359 maximum offset or address size, much the same has EDTASM and other pure | |
360 two pass assemblers do. The side effect is that all line lengths and | |
361 symbol values are fully resolved after the initial parsing pass and the | |
362 amount of work to resolve everything becomes almost nil.</P | |
363 ><P | |
364 >While this pragma can be applied selectively to sections of source | |
365 code (use *PRAGMA if doing so and compatibility with other assemblers | |
366 is desired), it is likely more useful when provided as a command line | |
367 pragma.</P | |
368 ><P | |
369 >It should be noted that the presence or absence of this pragma | |
370 will not change the correctness of the generated code unless cycle counts | |
371 or byte counts are critical (which they usually are not). It also will | |
372 not override the operand size override prefixes (< and >). It only | |
373 applies when the assembler is left to guess what the operand size is.</P | |
343 ></DD | 374 ></DD |
344 ></DL | 375 ></DL |
345 ></DIV | 376 ></DIV |
346 ><P | 377 ><P |
347 >As a convenience, each input file has a pragma state stack. This | 378 >As a convenience, each input file has a pragma state stack. This |
392 ><TD | 423 ><TD |
393 WIDTH="33%" | 424 WIDTH="33%" |
394 ALIGN="right" | 425 ALIGN="right" |
395 VALIGN="top" | 426 VALIGN="top" |
396 ><A | 427 ><A |
397 HREF="c727.html" | 428 HREF="c734.html" |
398 ACCESSKEY="N" | 429 ACCESSKEY="N" |
399 >Next</A | 430 >Next</A |
400 ></TD | 431 ></TD |
401 ></TR | 432 ></TR |
402 ><TR | 433 ><TR |