Created
December 5, 2024 21:11
-
-
Save aberranthacker/f0d26b92fbf07617d4bd2764abd66c23 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -54,12 +54,12 @@ int asm_option[ASM_OPT_NUM]; | |
| /* These chars start a comment anywhere in a source file (except inside | |
| another comment. */ | |
| -const char comment_chars[] = "#/"; | |
| +const char comment_chars[] = ";"; | |
| /* These chars only start a comment at the beginning of a line. */ | |
| -const char line_comment_chars[] = "#/"; | |
| +const char line_comment_chars[] = ";"; | |
| -const char line_separator_chars[] = ";"; | |
| +const char line_separator_chars[] = ""; | |
| /* Chars that can be used to separate mant from exp in floating point nums. */ | |
| const char EXP_CHARS[] = "eE"; | |
| @@ -271,11 +271,15 @@ md_apply_fix (fixS *fixP, | |
| case BFD_RELOC_PDP11_DISP_8_PCREL: | |
| mask = 0x00ff; | |
| shift = 1; | |
| + if ((int)val < -256 || (int)val > 254) | |
| + as_bad (_("Branch offset %i is out of range, opcode: %lo"), val >> 1, code); | |
| break; | |
| case BFD_RELOC_PDP11_DISP_6_PCREL: | |
| mask = 0x003f; | |
| shift = 1; | |
| val = -val; | |
| + if ((int)val < -126) | |
| + as_bad (_("SOB offset %i is out of range, opcode: %lo"), val >> 1, code); | |
| break; | |
| default: | |
| BAD_CASE (fixP->fx_r_type); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#/as comment characters with;, which allows to use#as prefix for immediate value, and to use/as division operator.BRandSOBinstructions offsets are out of range.