comparison docs/manual/manual.html @ 455:cad5937314cb

Add operandsizewarning pragma Add operandsizewarning pragma that will raise warnings for certain operands if the operand size could be smaller. (Long branch used instead of short branch, for instance.)
author William Astle <lost@l-w.ca>
date Fri, 16 Feb 2018 22:53:46 -0700
parents 566660ef3b4d
children a71206ed966c
comparison
equal deleted inserted replaced
454:ffdef8994f13 455:cad5937314cb
198 HREF="#CONVINST" 198 HREF="#CONVINST"
199 >Convenience Instructions</A 199 >Convenience Instructions</A
200 ></DT 200 ></DT
201 ><DT 201 ><DT
202 >3.12. <A 202 >3.12. <A
203 HREF="#AEN800" 203 HREF="#AEN805"
204 >Cycle Counts</A 204 >Cycle Counts</A
205 ></DT 205 ></DT
206 ></DL 206 ></DL
207 ></DD 207 ></DD
208 ><DT 208 ><DT
209 >4. <A 209 >4. <A
210 HREF="#AEN806" 210 HREF="#AEN811"
211 >LWLINK</A 211 >LWLINK</A
212 ></DT 212 ></DT
213 ><DD 213 ><DD
214 ><DL 214 ><DL
215 ><DT 215 ><DT
216 >4.1. <A 216 >4.1. <A
217 HREF="#AEN809" 217 HREF="#AEN814"
218 >Command Line Options</A 218 >Command Line Options</A
219 ></DT 219 ></DT
220 ><DT 220 ><DT
221 >4.2. <A 221 >4.2. <A
222 HREF="#AEN906" 222 HREF="#AEN911"
223 >Linker Operation</A 223 >Linker Operation</A
224 ></DT 224 ></DT
225 ><DT 225 ><DT
226 >4.3. <A 226 >4.3. <A
227 HREF="#AEN920" 227 HREF="#AEN925"
228 >Linking Scripts</A 228 >Linking Scripts</A
229 ></DT 229 ></DT
230 ><DT 230 ><DT
231 >4.4. <A 231 >4.4. <A
232 HREF="#AEN986" 232 HREF="#AEN991"
233 >Format Specific Linking Notes</A 233 >Format Specific Linking Notes</A
234 ></DT 234 ></DT
235 ><DD 235 ><DD
236 ><DL 236 ><DL
237 ><DT 237 ><DT
238 >4.4.1. <A 238 >4.4.1. <A
239 HREF="#AEN989" 239 HREF="#AEN994"
240 >OS9 Modules</A 240 >OS9 Modules</A
241 ></DT 241 ></DT
242 ></DL 242 ></DL
243 ></DD 243 ></DD
244 ></DL 244 ></DL
245 ></DD 245 ></DD
246 ><DT 246 ><DT
247 >5. <A 247 >5. <A
248 HREF="#AEN1001" 248 HREF="#AEN1006"
249 >Libraries and LWAR</A 249 >Libraries and LWAR</A
250 ></DT 250 ></DT
251 ><DD 251 ><DD
252 ><DL 252 ><DL
253 ><DT 253 ><DT
254 >5.1. <A 254 >5.1. <A
255 HREF="#AEN1005" 255 HREF="#AEN1010"
256 >Command Line Options</A 256 >Command Line Options</A
257 ></DT 257 ></DT
258 ></DL 258 ></DL
259 ></DD 259 ></DD
260 ><DT 260 ><DT
272 ><B 272 ><B
273 >List of Tables</B 273 >List of Tables</B
274 ></DT 274 ></DT
275 ><DT 275 ><DT
276 >6-1. <A 276 >6-1. <A
277 HREF="#AEN1088" 277 HREF="#AEN1093"
278 >Object File Term Types</A 278 >Object File Term Types</A
279 ></DT 279 ></DT
280 ><DT 280 ><DT
281 >6-2. <A 281 >6-2. <A
282 HREF="#AEN1118" 282 HREF="#AEN1123"
283 >Object File Operator Numbers</A 283 >Object File Operator Numbers</A
284 ></DT 284 ></DT
285 ></DL 285 ></DL
286 ></DIV 286 ></DIV
287 ><DIV 287 ><DIV
2510 or byte counts are critical (which they usually are not). It also will 2510 or byte counts are critical (which they usually are not). It also will
2511 not override the operand size override prefixes (&lt; and &gt;). It only 2511 not override the operand size override prefixes (&lt; and &gt;). It only
2512 applies when the assembler is left to guess what the operand size is.</P 2512 applies when the assembler is left to guess what the operand size is.</P
2513 ></DD 2513 ></DD
2514 ><DT 2514 ><DT
2515 >operandsizewarning</DT
2516 ><DD
2517 ><P
2518 >Enabling this pragma will cause LWASM to show a warning when it
2519 detects that a smaller addressing mode could be used for an instruction.
2520 This is particularly useful for finding places where long branches are used
2521 where short branches could be used instead. It will also show the warnings
2522 for indexing offsets (regardless of whether the operand size is
2523 forced).</P
2524 ><P
2525 >As of LWASM 4.16, no other checks are performed.</P
2526 ></DD
2527 ><DT
2515 >qrts</DT 2528 >qrts</DT
2516 ><DD 2529 ><DD
2517 ><P 2530 ><P
2518 >&#13;Enables the use of the ?RTS branch target. ?RTS is implemented to maintain 2531 >&#13;Enables the use of the ?RTS branch target. ?RTS is implemented to maintain
2519 compatibility with the MACRO-80c assembler. It works by searching backward 2532 compatibility with the MACRO-80c assembler. It works by searching backward
2614 ><DIV 2627 ><DIV
2615 CLASS="SECTION" 2628 CLASS="SECTION"
2616 ><HR><H2 2629 ><HR><H2
2617 CLASS="SECTION" 2630 CLASS="SECTION"
2618 ><A 2631 ><A
2619 NAME="AEN800" 2632 NAME="AEN805"
2620 >3.12. Cycle Counts</A 2633 >3.12. Cycle Counts</A
2621 ></H2 2634 ></H2
2622 ><P 2635 ><P
2623 >&#13;The following options for displaying cycle counts in listings are provided. 2636 >&#13;The following options for displaying cycle counts in listings are provided.
2624 These options are enabled from pragmas on the command line or in the 2637 These options are enabled from pragmas on the command line or in the
2653 ></DIV 2666 ></DIV
2654 ><DIV 2667 ><DIV
2655 CLASS="CHAPTER" 2668 CLASS="CHAPTER"
2656 ><HR><H1 2669 ><HR><H1
2657 ><A 2670 ><A
2658 NAME="AEN806" 2671 NAME="AEN811"
2659 ></A 2672 ></A
2660 >Chapter 4. LWLINK</H1 2673 >Chapter 4. LWLINK</H1
2661 ><P 2674 ><P
2662 >The LWTOOLS linker is called LWLINK. This chapter documents the various features 2675 >The LWTOOLS linker is called LWLINK. This chapter documents the various features
2663 of the linker.</P 2676 of the linker.</P
2664 ><DIV 2677 ><DIV
2665 CLASS="SECTION" 2678 CLASS="SECTION"
2666 ><HR><H2 2679 ><HR><H2
2667 CLASS="SECTION" 2680 CLASS="SECTION"
2668 ><A 2681 ><A
2669 NAME="AEN809" 2682 NAME="AEN814"
2670 >4.1. Command Line Options</A 2683 >4.1. Command Line Options</A
2671 ></H2 2684 ></H2
2672 ><P 2685 ><P
2673 >The binary for LWLINK is called "lwlink". Note that the binary is in lower 2686 >The binary for LWLINK is called "lwlink". Note that the binary is in lower
2674 case. lwlink takes the following command line arguments.</P 2687 case. lwlink takes the following command line arguments.</P
2862 ><DIV 2875 ><DIV
2863 CLASS="SECTION" 2876 CLASS="SECTION"
2864 ><HR><H2 2877 ><HR><H2
2865 CLASS="SECTION" 2878 CLASS="SECTION"
2866 ><A 2879 ><A
2867 NAME="AEN906" 2880 NAME="AEN911"
2868 >4.2. Linker Operation</A 2881 >4.2. Linker Operation</A
2869 ></H2 2882 ></H2
2870 ><P 2883 ><P
2871 >&#13;LWLINK takes one or more files in supported input formats and links them 2884 >&#13;LWLINK takes one or more files in supported input formats and links them
2872 into a single binary. Currently supported formats are the LWTOOLS object 2885 into a single binary. Currently supported formats are the LWTOOLS object
2918 ><DIV 2931 ><DIV
2919 CLASS="SECTION" 2932 CLASS="SECTION"
2920 ><HR><H2 2933 ><HR><H2
2921 CLASS="SECTION" 2934 CLASS="SECTION"
2922 ><A 2935 ><A
2923 NAME="AEN920" 2936 NAME="AEN925"
2924 >4.3. Linking Scripts</A 2937 >4.3. Linking Scripts</A
2925 ></H2 2938 ></H2
2926 ><P 2939 ><P
2927 >A linker script is used to instruct the linker about how to assemble the 2940 >A linker script is used to instruct the linker about how to assemble the
2928 various sections into a completed binary. It consists of a series of 2941 various sections into a completed binary. It consists of a series of
3122 ><DIV 3135 ><DIV
3123 CLASS="SECTION" 3136 CLASS="SECTION"
3124 ><HR><H2 3137 ><HR><H2
3125 CLASS="SECTION" 3138 CLASS="SECTION"
3126 ><A 3139 ><A
3127 NAME="AEN986" 3140 NAME="AEN991"
3128 >4.4. Format Specific Linking Notes</A 3141 >4.4. Format Specific Linking Notes</A
3129 ></H2 3142 ></H2
3130 ><P 3143 ><P
3131 >Some formats require special information to be able to generate actual 3144 >Some formats require special information to be able to generate actual
3132 binaries. If the specific format you are interested in is not listed in 3145 binaries. If the specific format you are interested in is not listed in
3135 ><DIV 3148 ><DIV
3136 CLASS="SECTION" 3149 CLASS="SECTION"
3137 ><HR><H3 3150 ><HR><H3
3138 CLASS="SECTION" 3151 CLASS="SECTION"
3139 ><A 3152 ><A
3140 NAME="AEN989" 3153 NAME="AEN994"
3141 >4.4.1. OS9 Modules</A 3154 >4.4.1. OS9 Modules</A
3142 ></H3 3155 ></H3
3143 ><P 3156 ><P
3144 >OS9 modules need to embed several items into the module header. These 3157 >OS9 modules need to embed several items into the module header. These
3145 items are the type of module, the langauge of the module, the module 3158 items are the type of module, the langauge of the module, the module
3211 ></DIV 3224 ></DIV
3212 ><DIV 3225 ><DIV
3213 CLASS="CHAPTER" 3226 CLASS="CHAPTER"
3214 ><HR><H1 3227 ><HR><H1
3215 ><A 3228 ><A
3216 NAME="AEN1001" 3229 NAME="AEN1006"
3217 ></A 3230 ></A
3218 >Chapter 5. Libraries and LWAR</H1 3231 >Chapter 5. Libraries and LWAR</H1
3219 ><P 3232 ><P
3220 >LWTOOLS also includes a tool for managing libraries. These are analogous to 3233 >LWTOOLS also includes a tool for managing libraries. These are analogous to
3221 the static libraries created with the "ar" tool on POSIX systems. Each library 3234 the static libraries created with the "ar" tool on POSIX systems. Each library
3230 ><DIV 3243 ><DIV
3231 CLASS="SECTION" 3244 CLASS="SECTION"
3232 ><HR><H2 3245 ><HR><H2
3233 CLASS="SECTION" 3246 CLASS="SECTION"
3234 ><A 3247 ><A
3235 NAME="AEN1005" 3248 NAME="AEN1010"
3236 >5.1. Command Line Options</A 3249 >5.1. Command Line Options</A
3237 ></H2 3250 ></H2
3238 ><P 3251 ><P
3239 >The binary for LWAR is called "lwar". Note that the binary is in lower 3252 >The binary for LWAR is called "lwar". Note that the binary is in lower
3240 case. The options lwar understands are listed below. For archive manipulation 3253 case. The options lwar understands are listed below. For archive manipulation
3431 followed by any data required by the term. Then end of the list is flagged 3444 followed by any data required by the term. Then end of the list is flagged
3432 by a NULL expression (only an end of expression term).</P 3445 by a NULL expression (only an end of expression term).</P
3433 ><DIV 3446 ><DIV
3434 CLASS="TABLE" 3447 CLASS="TABLE"
3435 ><A 3448 ><A
3436 NAME="AEN1088" 3449 NAME="AEN1093"
3437 ></A 3450 ></A
3438 ><P 3451 ><P
3439 ><B 3452 ><B
3440 >Table 6-1. Object File Term Types</B 3453 >Table 6-1. Object File Term Types</B
3441 ></P 3454 ></P
3503 allows local symbols that are not exported to have the same names as 3516 allows local symbols that are not exported to have the same names as
3504 exported symbols or external references.</P 3517 exported symbols or external references.</P
3505 ><DIV 3518 ><DIV
3506 CLASS="TABLE" 3519 CLASS="TABLE"
3507 ><A 3520 ><A
3508 NAME="AEN1118" 3521 NAME="AEN1123"
3509 ></A 3522 ></A
3510 ><P 3523 ><P
3511 ><B 3524 ><B
3512 >Table 6-2. Object File Operator Numbers</B 3525 >Table 6-2. Object File Operator Numbers</B
3513 ></P 3526 ></P