[Info-vax] VAX Macro to C conversion

Craig A. Berry craigberry at nospam.mac.com
Wed Jul 24 20:36:27 EDT 2019


On 7/24/19 8:28 AM, John Reagan wrote:
> On Wednesday, July 24, 2019 at 7:47:15 AM UTC-4, Simon Clubley wrote:
>> On 2019-07-22, VAXman-  @SendSpamHere.ORG <VAXman- at SendSpamHere.ORG> wrote:
>>>
>>> So, all the other languages need the same sort of special RTL support
>>> that was afforded to C. ;)
>>>
>>
>> There's two levels here:
>>
>> 1) RTL support for the intrinsic language features.
>>
>> C is sufficiently bare-bones that it doesn't need much of a RTL
>> (if any) to write working C code. Compare that to the description
>> John posted about the Basic internals.
>>
> 
> Correct.  For those of you keeping score at home, here's the list of the DECC$ functions that are linked into the system base image (some are the same objects as what's in DECC$SHR, others have been compiled a 2nd time to remove code that won't function in the kernel like 'locale support')
> 
>          DECC$ATOI                       = PROCEDURE,-
>          DECC$ATOL                       = PROCEDURE,-
>          DECC$MEMCHR                     = PROCEDURE,-
>          DECC$MEMCMP                     = PROCEDURE,-
>          DECC$STRCAT                     = PROCEDURE,-
>          DECC$STRCHR                     = PROCEDURE,-
>          DECC$STRCMP                     = PROCEDURE,-
>          DECC$STRCPY                     = PROCEDURE,-

Yum, ASCIZ string functions with no bounds checking in the kernel :-).
Probably not the most dangerous thing out there, but possibly worth a
rethink at some point.  Plus if any of this code could be upgraded to
compile under clang, ASAN could spot some things that shouldn't happen.
  I suspect that's out of the question though, since kernel code probably
uses all the pragmas that will not be available in clang.

>          DECC$STRCSPN                    = PROCEDURE,-
>          DECC$STRLEN                     = PROCEDURE,-
>          DECC$STRNCAT                    = PROCEDURE,-
>          DECC$STRNCPY                    = PROCEDURE,-
>          DECC$STRPBRK                    = PROCEDURE,-
>          DECC$STRRCHR                    = PROCEDURE,-
>          DECC$STRSPN                     = PROCEDURE,-
>          DECC$RAND                       = PROCEDURE,-
>          DECC$SRAND                      = PROCEDURE,-
>          DECC$STRTOL                     = PROCEDURE,-
>          DECC$STRTOK                     = PROCEDURE,-
>          DECC$STRNCMP                    = PROCEDURE,-
>          DECC$STRSTR                     = PROCEDURE,-
>          DECC$STRTOUL                    = PROCEDURE,-
>          DECC$MEMCPY                     = PROCEDURE,-
>          DECC$MEMMOVE                    = PROCEDURE,-
>          DECC$MEMSET                     = PROCEDURE,-
>          DECC$ABS                        = PROCEDURE,-
>          DECC$LABS                       = PROCEDURE)
>          DECC$ISALNUM                    = PROCEDURE, -
>          DECC$ISALPHA                    = PROCEDURE, -
>          DECC$ISASCII                    = PROCEDURE, -
>          DECC$ISCNTRL                    = PROCEDURE, -
>          DECC$ISDIGIT                    = PROCEDURE, -
>          DECC$ISGRAPH                    = PROCEDURE, -
>          DECC$ISLOWER                    = PROCEDURE, -
>          DECC$ISPRINT                    = PROCEDURE, -
>          DECC$ISPUNCT                    = PROCEDURE, -
>          DECC$ISSPACE                    = PROCEDURE, -
>          DECC$ISUPPER                    = PROCEDURE, -
>          DECC$ISXDIGIT                   = PROCEDURE, -
>          DECC$TOLOWER                    = PROCEDURE, -
>          DECC$TOUPPER                    = PROCEDURE, -
>          DECC$STRNLEN                    = PROCEDURE)
> 
> and the matching "W" wide-char flavors (although I'm not sure how much that was necessary other than both forms come in the same .OBJ files)
> 
> And a bunch of the OTS$ routines which are from GEM-generated code.
> 
>          OTS$CALL_PROC           = PROCEDURE,-
>          OTS$BIT_AND             = PROCEDURE,-
>          OTS$BIT_CMP_EQL         = PROCEDURE,-
>          OTS$BIT_CMP_EQLP        = PROCEDURE,-
>          OTS$BIT_CMP_EQLS        = PROCEDURE,-
>          OTS$BIT_CMP_LEQ         = PROCEDURE,-
>          OTS$BIT_CMP_LEQP        = PROCEDURE,-
>          OTS$BIT_CMP_LEQS        = PROCEDURE,-
>          OTS$BIT_CMP_LSS         = PROCEDURE,-
>          OTS$BIT_CMP_LSSP        = PROCEDURE,-
>          OTS$BIT_CMP_LSSS        = PROCEDURE,-
>          OTS$BIT_DIFF            = PROCEDURE,-
>          OTS$BIT_EQV             = PROCEDURE,-
>          OTS$BIT_FILL            = PROCEDURE,-
>          OTS$BIT_INDEX           = PROCEDURE,-
>          OTS$BIT_INDEX_BIT       = PROCEDURE,-
>          OTS$BIT_MOVE            = PROCEDURE,-
>          OTS$BIT_MOVEM           = PROCEDURE,-
>          OTS$BIT_NOT             = PROCEDURE,-
>          OTS$BIT_OR              = PROCEDURE,-
>          OTS$BIT_XOR             = PROCEDURE,-
>          OTS$BIT_ZERO            = PROCEDURE,-
>          OTS$BLISS_DYNAMIC_HANDLER = PROCEDURE,-
>          OTS$BLISS_STATIC_HANDLER = PROCEDURE,-
>          OTS$DIV_I               = PROCEDURE,-
>          OTS$DIV_L               = PROCEDURE,-
>          OTS$DIV_UI              = PROCEDURE,-
>          OTS$DIV_UL              = PROCEDURE,-
>          OTS$EXTV                = PROCEDURE,-
>          OTS$EXTV_VOL            = PROCEDURE,-
>          OTS$EXTZV               = PROCEDURE,-
>          OTS$EXTZV_VOL           = PROCEDURE,-
>          OTS$FILL                = PROCEDURE,-
>          OTS$HOME_ARGS           = PROCEDURE,-
>          OTS$INDEX               = PROCEDURE,-
>          OTS$INDEX_CHAR          = PROCEDURE,-
>          OTS$INSV                = PROCEDURE,-
>          OTS$INSV_VOL            = PROCEDURE,-
>          OTS$JUMP_TO_BPV         = PROCEDURE,-
>          OTS$MOD_I               = PROCEDURE,-
>          OTS$MOD_L               = PROCEDURE,-
>          OTS$MOVE                = PROCEDURE,-
>          OTS$MOVEM               = PROCEDURE,-
>          OTS$REM_I               = PROCEDURE,-
>          OTS$REM_L               = PROCEDURE,-
>          OTS$REM_UI              = PROCEDURE,-
>          OTS$REM_UL              = PROCEDURE,-
>          OTS$SEARCH              = PROCEDURE,-
>          OTS$SEARCH_CHAR         = PROCEDURE,-
>          OTS$SEARCH_MASK         = PROCEDURE,-
>          OTS$STRCMP_EQL          = PROCEDURE,-
>          OTS$STRCMP_EQLP         = PROCEDURE,-
>          OTS$STRCMP_EQLS         = PROCEDURE,-
>          OTS$STRCMP_LEQ          = PROCEDURE,-
>          OTS$STRCMP_LEQP         = PROCEDURE,-
>          OTS$STRCMP_LEQS         = PROCEDURE,-
>          OTS$STRCMP_LSS          = PROCEDURE,-
>          OTS$STRCMP_LSSP         = PROCEDURE,-
>          OTS$STRCMP_LSSS         = PROCEDURE,-
>          OTS$TRANSLATE           = PROCEDURE,-
>          OTS$VERIFY              = PROCEDURE,-
>          OTS$VERIFY_CHAR         = PROCEDURE,-
>          OTS$VERIFY_MASK         = PROCEDURE,-
>          OTS$ZERO                = PROCEDURE,-
>          OTS$BIT_IS_MEMBER       = PROCEDURE,-
>          OTS$BIT_IS_SUPERSET     = PROCEDURE,-
>          OTS$DIV_I_O             = PROCEDURE,-
>          OTS$DIV_L_O             = PROCEDURE,-
>          OTS$STR16_ZERO          = PROCEDURE,-
>          OTS$STR16_FILL          = PROCEDURE,-
>          OTS$STR16_MOVE          = PROCEDURE,-
>          OTS$STR16_MOVEM         = PROCEDURE,-
>          OTS$STR16_TRANSLATE     = PROCEDURE,-
>          OTS$STR16_CMP_EQL       = PROCEDURE,-
>          OTS$STR16_CMP_EQLP      = PROCEDURE,-
>          OTS$STR16_CMP_EQLS      = PROCEDURE,-
>          OTS$STR16_CMP_LEQ       = PROCEDURE,-
>          OTS$STR16_CMP_LEQP      = PROCEDURE,-
>          OTS$STR16_CMP_LEQS      = PROCEDURE,-
>          OTS$STR16_CMP_LSS       = PROCEDURE,-
>          OTS$STR16_CMP_LSSP      = PROCEDURE,-
>          OTS$STR16_CMP_LSSS      = PROCEDURE,-
>          OTS$STR16_INDEX         = PROCEDURE,-
>          OTS$STR16_INDEX_CHAR    = PROCEDURE,-
>          OTS$STR16_SEARCH        = PROCEDURE,-
>          OTS$STR16_SEARCH_CHAR   = PROCEDURE,-
>          OTS$STR16_SEARCH_MASK   = PROCEDURE,-
>          OTS$STR16_VERIFY        = PROCEDURE,-
>          OTS$STR16_VERIFY_CHAR   = PROCEDURE,-
>          OTS$STR16_VERIFY_MASK   = PROCEDURE)
> 
> For x86, the OTS$ set is greatly reduced since it isn't GEM as the code generator.  The GEM-to-LLVM converter does turn various GEM IR tuples into OTS$ routine calls just like GEM on Alpha/Itanium does (although at different points in the conversion)
> 




More information about the Info-vax mailing list