XPORT Dynamic Memory Manager 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 1 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 0 1 MODULE XMEM ( IDENT = 'V1.3-21' %TITLE 'XPORT Dynamic Memory Manager' 0 2 %BLISS32( ,ADDRESSING_MODE( EXTERNAL=LONG_RELATIVE ) ) 0 3 %BLISS36( ,ENTRY( XPO$ALLOC_MEM, XPO$FREE_MEM ),OTS='' ) 0 4 ) = 0 5 BEGIN 1 6 1 7 ! 1 8 ! COPYRIGHT (c) 1983, 1984 BY 1 9 ! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 1 10 ! 1 11 ! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED 1 12 ! ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE 1 13 ! INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER 1 14 ! COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY 1 15 ! OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY 1 16 ! TRANSFERRED. 1 17 ! 1 18 ! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE 1 19 ! AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT 1 20 ! CORPORATION. 1 21 ! 1 22 ! DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS 1 23 ! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL. 1 24 ! 1 25 1 26 !++ 1 27 ! 1 28 ! FACILITY: BLISS Library 1 29 ! 1 30 ! ABSTRACT: 1 31 ! 1 32 ! This module comprises the entire XPORT dynamic memory 1 33 ! management package. 1 34 ! 1 35 ! ENVIRONMENT: User mode - multiple host operating/file systems 1 36 ! 1 37 ! AUTHORS: Ward Clark, CREATION DATE: 15 December 1978 1 38 ! Linda Duffell 1 39 ! 1 40 ! REVISION HISTORY: 1 41 ! 1 42 ! 2-Apr-1984 LYS In XPO$FREE_MEM added VMS only code 1 43 ! to check if the memory element being 1 44 ! freed is quadword aligned if LIB$FREE_VM 1 45 ! is to be used to free the memory and to 1 46 ! check if the memory is longword aligned 1 47 ! if LIB$SFREE1_DD is to be used to free 1 48 ! the memory. 1 49 ! 1 50 ! END OF REVISION HISTORY 1 51 !-- XMEM XPORT Dynamic Memory Manager 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 2 V1.3-21 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 1 53 ! 1 54 ! TABLE OF CONTENTS: 1 55 ! 1 56 1 57 ! FORWARD ROUTINE 1 58 ! XPO$ALLOC_MEM, ! XPORT allocate memory routine 1 59 ! XPO$FREE_MEM; ! XPORT free memory routine 1 60 1 61 ! 1 62 ! INCLUDE FILES: 1 63 ! 1 64 1 65 LIBRARY 'XPORT' ; ! Public XPORT control block and macro definitions 1 67 LIBRARY 'XPOSYS' ; ! Internal XPORT macro definitions 1 69 1 70 $XPO_SYS_TEST( $TOPS10, $TOPS20, $VMS, $11M, $RSTS, $RT11 ) ; %PRINT: This module was compiled for VAX/VMS ; %PRINT: XPORT V1.3-51 XPOSYS V1.3-16 XPO$K_VERSION = 1 XPO$K_LEVEL = 3 1 71 1 72 ! 1 73 ! MACROS: 1 74 ! 1 75 1 76 ! 1 77 ! EQUATED SYMBOLS: 1 78 ! 1 79 1 80 ! 1 81 ! PSECT DECLARATIONS: 1 82 ! 1 83 1 84 $XPO_PSECTS ! Declare XPORT PSECT names and attributes 1 85 1 86 ! 1 87 ! OWN STORAGE: 1 88 ! 1 89 1 90 ! 1 91 ! EXTERNAL REFERENCES: 1 92 ! 1 93 1 94 ! See specific routines. XMEM XPO$ALLOC_MEM - XPORT Dynamic M 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 3 V1.3-21 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 1 96 %TITLE 'XPO$ALLOC_MEM - XPORT Dynamic Memory Allocator' 1 97 1 98 GLOBAL ROUTINE XPO$ALLOC_MEM( element_size, desc, fill_indicator, fill_value, success_action, failure_action ) = 1 99 1 100 !++ 1 101 ! 1 102 ! FUNCTIONAL DESCRIPTION: 1 103 ! 1 104 ! FORMAL PARAMETERS: 1 105 ! 1 106 ! element_size - requested size of element 1 107 ! desc - address of string/data descriptor which contains 1 108 ! the requested memory element type and size 1 109 ! fill_indicator - storage initialization indicator: 1 110 ! XPO$K_DONT_FILL - don't fill element 1 111 ! XPO$K_FILL_UNIT - fill binary units 1 112 ! XPO$K_FILL_FULL - fill binary fullwords 1 113 ! fill_value - storage initialization value 1 114 ! success_action - address of success action routine 1 115 ! failure_action - address of failure action routine 1 116 ! 1 117 ! IMPLICIT INPUTS: 1 118 ! 1 119 ! None 1 120 ! 1 121 ! IMPLICIT OUTPUTS: 1 122 ! 1 123 ! desc[STR$A_POINTER] = pointer to allocated character element 1 124 ! desc[XPO$A_ADDRESS] = address of allocated binary element 1 125 ! 1 126 ! COMPLETION CODE: 1 127 ! 1 128 ! XPO$_NORMAL - storage was successfully allocated 1 129 ! 1 130 ! XPO$_BAD_DESC - invalid string/data descriptor 1 131 ! (IOB$G_2ND_CODE = XPO$_BAD_DTYPE - invalid descriptor data type 1 132 ! or XPO$_BAD_CLASS - invalid descriptor class 1 133 ! or XPO$_BAD_ADDR - invalid descriptor address) 1 134 ! XPO$_BAD_LOGIC - invalid request descriptor 1 135 ! XPO$_FOREGROUND - this job is a foreground job (RT-11) 1 136 ! XPO$_NO_MEMORY - insufficient dynamic memory to satisfy request (VMS) 1 137 ! or if failure status from FUNCT. (TOPS-10/20 OTS). 1 138 ! failure completion code from XPO$$ALLOC_MEM (non-VMS). 1 139 ! 1 140 ! SIDE EFFECTS: 1 141 ! 1 142 ! None 1 143 ! 1 144 !-- 1 145 1 146 BEGIN 2 147 2 148 MAP 2 149 desc : REF $STR_DESCRIPTOR( CLASS=BOUNDED ); ! Redefine the descriptor parameter 2 150 2 151 BIND 2 152 string = desc : REF $STR_DESCRIPTOR( CLASS = BOUNDED ), XMEM XPO$ALLOC_MEM - XPORT Dynamic M 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 4 V1.3-21 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 2 153 data = desc : REF $XPO_DESCRIPTOR( CLASS = BOUNDED ); 2 154 2 155 %IF $VMS %THEN 2 156 EXTERNAL ROUTINE ! VAX/VMS dynamic memory routines: 2 157 LIB$SGET1_DD : ADDRESSING_MODE(GENERAL), ! dynamic string allocation 2 158 LIB$GET_VM : ADDRESSING_MODE(GENERAL); ! dynamic memory allocation 2 159 2 160 EXTERNAL LITERAL 2 161 LIB$_INSVIRMEM; ! RTL completion code 2 162 %ELSE U 2 163 EXTERNAL ROUTINE U 2 164 XPO$$ALLOC_MEM; ! XPORT transportable heap storage allocator U 2 165 %FI 2 166 2 167 %IF $RT11 %THEN U 2 168 EXTERNAL ROUTINE U 2 169 XRT$CHK_BACKGRD; ! Background job verification U 2 170 %FI 2 171 2 172 %IF %BLISS(BLISS36) %THEN U 2 173 MACRO U 2 174 funct$ = %NAME ('funct.') %; ! BLISS doesn't allow "." character in names. U 2 175 U 2 176 EXTERNAL ROUTINE ! The FORTRAN OTS routine "FUNCT." on TOPS-10/20 or the U 2 177 funct$ : NOVALUE FORTRAN_SUB; ! XPORT routine to take the place of FORTRAN OTS routine U 2 178 ! whenever the user does not link with the FORTRAN OTS. U 2 179 U 2 180 LOCAL U 2 181 function : INITIAL (0), ! illegal code if real FUNCT. U 2 182 error : INITIAL (0), ! three letter error mnemonic U 2 183 status : INITIAL (0), ! Depends on requested function: U 2 184 ! Function = 0 (F.ILL) U 2 185 ! -1 if we're linked with OTS U 2 186 ! 0 if we're linked without OTS U 2 187 ! Function = 6 (F.GOT) or 7 (F.ROT) U 2 188 ! 0 if allocated (GOT) or deallocated (ROT) ok U 2 189 ! 1 if not enough memory (GOT) or never allocated (ROT) U 2 190 ! 3 if argument error U 2 191 mem_address : INITIAL (0), ! address of allocated memory U 2 192 mem_size : INITIAL (0); ! size to be allocated, in words U 2 193 U 2 194 %ELSE 2 195 LOCAL 2 196 status; ! Temporary routine completion code 2 197 2 198 %FI 2 199 2 200 ! 2 201 ! XPORT routine initialization. 2 202 ! 2 203 2 204 $XPO_MAIN_BEGIN( GET_MEM ) ! Define the MAIN_BLOCK code block. 3 205 3 206 %IF $RT11 %THEN U 3 207 ! U 3 208 ! Verify that this is a background job. U 3 209 ! XMEM XPO$ALLOC_MEM - XPORT Dynamic M 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 5 V1.3-21 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 U 3 210 U 3 211 IF NOT XRT$CHK_BACKGRD( ) U 3 212 THEN U 3 213 $XPO_QUIT( FOREGROUND ); U 3 214 %FI 3 215 3 216 ! 3 217 ! Verify that the request descriptor is valid. 3 218 ! 3 219 3 220 ! The descriptor is invalid if one or more of 3 221 ! the following conditions exist: 3 222 IF .data[XPO$B_DTYPE] NEQ XPO$K_DTYPE_BU AND ! the data type is not UNITS 3 223 .string[STR$B_DTYPE] NEQ STR$K_DTYPE_T ! or CHARACTERS 3 224 THEN 3 225 $XPO_QUIT( BAD_DESC, BAD_DTYPE ); 3 226 3 227 IF .string[STR$B_CLASS] NEQ STR$K_CLASS_D AND ! the descriptor is not a DYNAMIC descriptor 3 228 .string[STR$B_CLASS] NEQ STR$K_CLASS_DB AND ! or a DYNAMIC_BOUNDED descriptor 3 229 .string[STR$B_CLASS] NEQ STR$K_CLASS_XT ! or an XPORT_TEMPORARY descriptor 3 230 THEN 3 231 $XPO_QUIT( BAD_DESC, BAD_CLASS ); 3 232 3 233 IF .string[STR$A_POINTER] NEQ 0 ! an element pointer/address was provided 3 234 THEN 3 235 $XPO_QUIT( BAD_DESC, BAD_ADDR ); 3 236 3 237 ! 3 238 ! Allocate the requested amount of dynamic memory. 3 239 ! 3 240 3 241 IF .element_size EQL 0 ! If no actual memory is requested, 3 242 THEN ! 3 243 $XPO_QUIT( NORMAL ); ! bypass memory allocation. 3 244 3 245 %IF $VMS %THEN 3 246 IF .string[STR$B_DTYPE] EQL STR$K_DTYPE_T 3 247 THEN 3 248 BEGIN 4 249 LOCAL temp : $STR_DESCRIPTOR( CLASS = DYNAMIC ); 4 250 $STR_DESC_INIT( DESCRIPTOR = temp, CLASS = DYNAMIC ); 4 251 4 252 status = LIB$SGET1_DD( element_size, temp ); ! Allocate a dynamic string 4 253 string[STR$A_POINTER] = .temp[STR$A_POINTER]; ! and save the allocated address. 4 254 END 4 255 ELSE ! Allocate a binary dynamic area. 3 256 status = LIB$GET_VM( element_size, string[STR$A_POINTER] ); 3 257 3 258 IF NOT .status ! If allocation fails, 3 259 THEN ! 3 260 IF .status EQL LIB$_INSVIRMEM ! return an appropriate error code to the caller. 3 261 THEN 3 262 $XPO_QUIT( NO_MEMORY ) 4 263 ELSE 3 264 $XPO_QUIT( BAD_LOGIC ); 3 265 3 266 %ELSE XMEM XPO$ALLOC_MEM - XPORT Dynamic M 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 6 V1.3-21 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 U 3 267 %IF %BLISS(BLISS36) %THEN U 3 268 U 3 269 funct$ ( function, error, status ); ! test to see if we are linked standalone or with OTS U 3 270 U 3 271 IF .status EQLU -1 ! linked with object time system U 3 272 THEN U 3 273 BEGIN ! use FUNCT. memory management U 3 274 function = %o'6'; ! F.GOT (Get Object Time memory) U 3 275 U 3 276 IF .data[XPO$B_DTYPE] NEQ XPO$K_DTYPE_BU ! If this is a TOPS-10/TOPS-20 character element U 3 277 THEN ! request, U 3 278 BEGIN ! U 3 279 mem_size = (.element_size+4)/5; ! allocate enough words (5 characters/word). U 3 280 funct$ ( function, error, status, U 3 281 mem_address, ! address of allocated memory U 3 282 mem_size ); ! size to be allocated, in words U 3 283 string[STR$A_POINTER] = CH$PTR(.mem_address); U 3 284 END U 3 285 ELSE U 3 286 BEGIN U 3 287 mem_size = .element_size; ! Otherwise, allocate the requested number of units. U 3 288 funct$ ( function, error, status, U 3 289 mem_address, ! address of allocated memory U 3 290 mem_size ); ! size to be allocated, in words U 3 291 data[XPO$A_ADDRESS] = .mem_address; U 3 292 END; U 3 293 U 3 294 IF .status NEQU 0 ! Heap storage allocation failed, U 3 295 THEN ! status=1 if insufficient memory, status=3 if size > 256k U 3 296 $XPO_QUIT( NO_MEMORY ); ! either way, there's not enough. U 3 297 END U 3 298 U 3 299 ELSE ! Not linked with an OTS, so use XHEAP U 3 300 U 3 301 BEGIN U 3 302 IF .data[XPO$B_DTYPE] NEQ XPO$K_DTYPE_BU ! If this is a TOPS-10/TOPS-20 character element U 3 303 THEN ! request, U 3 304 BEGIN ! U 3 305 status = XPO$$ALLOC_MEM( (.element_size+4)/5, ! allocate enough words (5 characters/word). U 3 306 string[STR$A_POINTER] ); U 3 307 string[STR$A_POINTER] = CH$PTR(.string[STR$A_POINTER]); U 3 308 END U 3 309 ELSE U 3 310 status = XPO$$ALLOC_MEM( .element_size, ! Otherwise, allocate the requested number of units. U 3 311 data[XPO$A_ADDRESS] ); U 3 312 U 3 313 IF NOT .status ! If heap storage allocation failed, U 3 314 THEN ! U 3 315 $XPO_QUIT( (.status) ); ! return the XPO$$ALLOC_MEM error code to the caller. U 3 316 END; U 3 317 U 3 318 %ELSE U 3 319 status = XPO$$ALLOC_MEM( .element_size, ! Otherwise, allocate the requested number of units. U 3 320 data[XPO$A_ADDRESS] ); U 3 321 U 3 322 IF NOT .status ! If heap storage allocation failed, U 3 323 THEN ! XMEM XPO$ALLOC_MEM - XPORT Dynamic M 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 7 V1.3-21 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 U 3 324 $XPO_QUIT( (.status) ); ! return the XPO$$ALLOC_MEM error code to the caller. U 3 325 %FI U 3 326 %FI 3 327 ! 3 328 ! Fillin the length fields in the caller's descriptor. 3 329 ! 3 330 3 331 IF .string[STR$B_CLASS] EQL STR$K_CLASS_DB 3 332 THEN 3 333 BEGIN 4 334 string[STR$H_LENGTH] = 0; 4 335 string[STR$H_MAXLEN] = .element_size; 4 336 END 4 337 ELSE 3 338 string[STR$H_LENGTH] = .element_size; 3 339 3 340 ! 3 341 ! Initialize the allocated memory element, if requested. 3 342 ! 3 343 3 344 IF .fill_indicator NEQ XPO$K_DONT_FILL ! Check to see if storage initialization is requested. 3 345 THEN 3 346 IF .data[XPO$B_DTYPE] NEQ XPO$K_DTYPE_BU 3 347 THEN 3 348 CH$FILL( .fill_value, .element_size, ! Character initialization 3 349 .string[STR$A_POINTER] ) 3 350 ELSE 3 351 IF .fill_indicator EQL XPO$K_FILL_UNIT 3 352 THEN 3 353 CH$FILL( .fill_value, ! Addressable unit initialization 3 354 .element_size, CH$PTR( .data[XPO$A_ADDRESS], 0, %BPUNIT ) ) 3 355 ELSE 3 356 BEGIN ! BLISS fullword initialization 4 357 BIND fullwords = .data[XPO$A_ADDRESS] : VECTOR; 4 358 INCR index FROM 0 TO (.element_size - 1) / %UPVAL DO 4 359 fullwords[.index] = .fill_value; 4 360 END; 3 361 3 362 $XPO_QUIT( NORMAL ); ! Indicate successful storage allocation. 3 363 3 364 ! 3 365 ! XPORT routine termination. 3 366 ! 3 367 3 368 $XPO_MAIN_END; ! Terminate MAIN_BLOCK. 2 369 2 370 IF NOT .primary_code ! If memory allocation failed, 2 371 THEN ! 2 372 string[STR$A_POINTER] = XPO$K_FAILURE; ! setup to return an invalid memory address. 2 373 2 374 $XPO_ACTION_RTN( desc[$BASE] ); ! Call a success or failure action routine. 2 375 2 376 ! 2 377 ! Return to the caller. 2 378 ! 2 379 2 380 RETURN .primary_code ! Return the final completion code to the caller. XMEM XPO$ALLOC_MEM - XPORT Dynamic M 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 8 V1.3-21 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 2 381 2 382 END; 1 383 1 384 $XPO_MODULE( XMEM1 ) XMEM XPO$FREE_MEM - XPORT Dynamic Me 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 9 V1.3-21 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 1 386 %TITLE 'XPO$FREE_MEM - XPORT Dynamic Memory Deallocator' 1 387 1 388 GLOBAL ROUTINE XPO$FREE_MEM( desc, fill_flag, fill_value, success_action, failure_action ) = 1 389 1 390 !++ 1 391 ! 1 392 ! FUNCTIONAL DESCRIPTION: 1 393 ! 1 394 ! This routine releases a single element of dynamic memory. 1 395 ! 1 396 ! FORMAL PARAMETERS: 1 397 ! 1 398 ! desc - address of string/data descriptor which describes 1 399 ! the character or binary memory element to be freed 1 400 ! fill_flag - clear storage indicator ( 1 = yes, 0 = no ) 1 401 ! fill_value - value to be used to clear storage 1 402 ! success_action - address of success action routine 1 403 ! failure_action - address of failure action routine 1 404 ! 1 405 ! IMPLICIT INPUTS: 1 406 ! 1 407 ! None 1 408 ! 1 409 ! IMPLICIT OUTPUTS: 1 410 ! 1 411 ! None 1 412 ! 1 413 ! COMPLETION CODE: 1 414 ! 1 415 ! XPO$_NORMAL - storage successfully freed 1 416 ! 1 417 ! XPO$_BAD_ADDR - storage to be freed is not in allocated dynamic memory (VMS) 1 418 ! or if failure status from FUNCT. (TOPS-10/20 OTS). 1 419 ! XPO$_BAD_ALIGN - storage to be freed is not fullword aligned (TOPS-10,TOPS-20) 1 420 ! XPO$_BAD_DESC - string/data descriptor is invalid 1 421 ! (IOB$G_2ND_CODE = XPO$_BAD_CLASS - invalid descriptor class 1 422 ! or XPO$_BAD_ADDR - invalid descriptor address) 1 423 ! XPO$_BAD_PTR - character pointer is not 7-bit 1 424 ! XPO$_FOREGROUND - this is a foreground job (RT-11) 1 425 ! failure completion code from XPO$$FREE_MEM (non-VMS) 1 426 ! 1 427 ! SIDE EFFECTS: 1 428 ! 1 429 ! None 1 430 ! 1 431 !-- 1 432 1 433 BEGIN 2 434 2 435 MAP 2 436 desc : REF $STR_DESCRIPTOR( CLASS=BOUNDED ); ! Redefine the descriptor parameter 2 437 2 438 BIND 2 439 string = desc : REF $STR_DESCRIPTOR( CLASS = BOUNDED ), 2 440 data = desc : REF $XPO_DESCRIPTOR( CLASS = BOUNDED ); 2 441 2 442 %IF $VMS %THEN XMEM XPO$FREE_MEM - XPORT Dynamic Me 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 10 V1.3-21 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 2 443 EXTERNAL ROUTINE ! VAX/VMS dynamic memory routines: 2 444 LIB$SFREE1_DD : ADDRESSING_MODE(GENERAL), ! dynamic string deallocation 2 445 LIB$FREE_VM : ADDRESSING_MODE(GENERAL); ! dynamic memory deallocation 2 446 2 447 EXTERNAL LITERAL 2 448 LIB$_INSVIRMEM; ! RTL completion code 2 449 %ELSE U 2 450 EXTERNAL ROUTINE U 2 451 XPO$$FREE_MEM; ! XPORT transportable heap storage deallocator U 2 452 %FI 2 453 2 454 %IF $RT11 %THEN U 2 455 EXTERNAL ROUTINE U 2 456 XRT$CHK_BACKGRD; ! Background job verification U 2 457 %FI 2 458 2 459 %IF %BLISS(BLISS36) %THEN U 2 460 MACRO U 2 461 funct$ = %NAME ('funct.') %; ! BLISS doesn't allow "." character in names. U 2 462 U 2 463 EXTERNAL ROUTINE ! The FORTRAN OTS routine "FUNCT." on TOPS-10/20 or the U 2 464 funct$ : NOVALUE FORTRAN_SUB; ! XPORT routine to take the place of FORTRAN OTS routine U 2 465 ! whenever the user does not link with the FORTRAN OTS. U 2 466 U 2 467 LOCAL U 2 468 function : INITIAL (0), ! illegal code if real FUNCT. U 2 469 error : INITIAL (0), ! three letter error mnemonic U 2 470 status : INITIAL (0), ! Depends on requested function: U 2 471 ! Function = 0 (F.ILL) U 2 472 ! -1 if we're linked with OTS U 2 473 ! 0 if we're linked without OTS U 2 474 ! Function = 6 (F.GOT) or 7 (F.ROT) U 2 475 ! 0 if allocated (GOT) or deallocated (ROT) ok U 2 476 ! 1 if not enough memory (GOT) or never allocated (ROT) U 2 477 ! 3 if argument error U 2 478 mem_address : INITIAL (0), ! address of memory to be deallocated U 2 479 mem_size : INITIAL (0); ! size to be deallocated, in words U 2 480 LOCAL U 2 481 element_size, ! Size of the memory element to be freed U 2 482 element_addr; ! Address of the memory element to be freed U 2 483 U 2 484 %ELSE 2 485 LOCAL 2 486 element_size, ! Size of the memory element to be freed 2 487 element_addr, ! Address of the memory element to be freed 2 488 status; ! Temporary routine completion code 2 489 %FI 2 490 2 491 ! 2 492 ! XPORT routine initialization. 2 493 ! 2 494 2 495 $XPO_MAIN_BEGIN( FREE_MEM ) ! Define the MAIN_BLOCK code block. 3 496 3 497 IF .string[STR$B_DTYPE] NEQ XPO$K_DTYPE_BU ! If this is not a binary data descriptor, 3 498 THEN ! make sure that it is a valid string descriptor. 3 499 $STR_VALIDATE( string[$BASE], (XPO$_BAD_DESC) ); XMEM XPO$FREE_MEM - XPORT Dynamic Me 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 11 V1.3-21 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 3 500 3 501 %IF $RT11 %THEN U 3 502 ! U 3 503 ! Verify that this is a background job. U 3 504 ! U 3 505 U 3 506 IF NOT XRT$CHK_BACKGRD( ) U 3 507 THEN U 3 508 $XPO_QUIT( FOREGROUND ); U 3 509 %FI 3 510 3 511 ! 3 512 ! Verify that the string/data descriptor is valid. 3 513 ! 3 514 3 515 SELECTONE .string[STR$B_CLASS] OF 3 516 SET 3 517 3 518 [ STR$K_CLASS_D, STR$K_CLASS_XT ] : ! DYNAMIC or XPORT_TEMPORARY descriptor: 3 519 BEGIN ! 4 520 element_size = .string[STR$H_LENGTH]; ! Pickup the element size 4 521 element_addr = .string[STR$A_POINTER]; ! and the address of the element. 4 522 END; 3 523 3 524 [ STR$K_CLASS_DB ] : ! DYNAMIC_BOUNDED descriptor: 3 525 BEGIN ! 4 526 element_size = .string[STR$H_MAXLEN]; ! Pickup the element size 4 527 IF .string[STR$B_DTYPE] EQL XPO$K_DTYPE_BU ! 4 528 THEN ! 4 529 element_addr = .data[XPO$A_ADDRESS] - ! and the address of the element 4 530 .data[XPO$H_PFXLEN] ! 4 531 ELSE ! 4 532 element_addr = ! or a pointer to the element. 4 533 CH$PLUS( .string[STR$A_POINTER], 4 534 -.string[STR$H_PFXLEN] ); 4 535 END; 3 536 3 537 [ STR$K_CLASS_F, STR$K_CLASS_B ] : ! FIXED or BOUNDED descriptor: 3 538 $XPO_QUIT( BAD_DESC, BAD_CLASS ); ! Return error codes to the caller. 3 539 3 540 [ STR$K_CLASS_Z ] : ! UNDEFINED descriptor: 3 541 IF .string[STR$H_LENGTH] EQL 0 ! If this is a null descriptor, 3 542 THEN ! 3 543 element_size = 0 ! let it pass. 3 544 ELSE ! 3 545 $XPO_QUIT( BAD_DESC, BAD_CLASS ); ! Otherwise, return error codes to the caller. 3 546 3 547 [ OTHERWISE ] : ! Invalid descriptor class: 3 548 $XPO_QUIT( BAD_DESC, BAD_CLASS ); ! Return error codes to the caller. 3 549 TES; 3 550 3 551 IF .element_size NEQ 0 ! If the element size is non-zero, 3 552 THEN ! validate the memory element descriptor. 3 553 BEGIN 4 554 IF .element_addr EQL 0 ! If no element pointer/address was provided, 4 555 THEN ! 4 556 $XPO_QUIT( BAD_DESC, BAD_ADDR ); ! return error codes to the caller. XMEM XPO$FREE_MEM - XPORT Dynamic Me 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 12 V1.3-21 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 4 557 4 558 %IF %BLISS(BLISS36) %THEN U 4 559 IF .string[STR$B_DTYPE] NEQ XPO$K_DTYPE_BU AND ! If a BLISS-36 character pointer is not U 4 560 ( (.element_addr AND %O'7777000000') ! a 7-bit pointer, U 4 561 NEQ %O'700000000' ) ! U 4 562 THEN ! U 4 563 $XPO_QUIT( BAD_PTR ); ! return an error completion code. U 4 564 U 4 565 IF .string[STR$B_DTYPE] NEQ XPO$K_DTYPE_BU AND ! If a BLISS-36 character pointer does not point to U 4 566 ( (.element_addr AND -1^18) ! a BLISS fullword boundary, U 4 567 NEQ %O'10700000000' ) ! U 4 568 THEN ! U 4 569 $XPO_QUIT( BAD_ALIGN ); ! return an error completion code. U 4 570 %FI 4 571 END; ! NOTE: BLISS-16 alignment checking is performed by XPO$$FRE 4 571 E_MEM. 3 572 3 573 ! 3 574 ! Clear the storage element, if requested. 3 575 ! 3 576 3 577 IF .fill_flag ! If the caller wants the storage cleared, 3 578 THEN ! 3 579 IF .string[STR$B_DTYPE] ! use the descriptor data type to select 3 580 NEQ XPO$K_DTYPE_BU ! to select appropriate clearing code. 3 581 3 582 THEN ! Clear character string. 3 583 CH$FILL( .fill_value, .element_size, .element_addr ) 3 584 3 585 ELSE ! Clear binary data. 3 586 CH$FILL( .fill_value, .element_size, 3 587 CH$PTR( .element_addr, 0, %BPUNIT ) ); 3 588 3 589 ! 3 590 ! Release the requested dynamic memory element. 3 591 ! 3 592 3 593 IF .element_size NEQ 0 ! If this is a zero-length element, 3 594 THEN ! don't attempt to free it. 3 595 BEGIN 4 596 %IF $VMS %THEN 4 597 IF .string[STR$B_DTYPE] EQL STR$K_DTYPE_T 4 598 THEN 4 599 BEGIN 5 600 LOCAL temp : $STR_DESCRIPTOR( CLASS = DYNAMIC ); 5 601 $STR_DESC_INIT( DESCRIPTOR = temp, CLASS = DYNAMIC ); 5 602 temp[STR$H_LENGTH] = .element_size; 5 603 temp[STR$A_POINTER] = .element_addr; 5 604 5 605 IF (.element_addr AND 3) NEQ 0 ! If the memory element is not 4-byte aligned, 5 606 THEN ! (longword aligned) 5 607 $XPO_QUIT( BAD_ALIGN ); ! return an error code to the caller. 5 608 5 609 IF NOT LIB$SFREE1_DD( temp ) THEN $XPO_QUIT( BAD_ADDR ); ! Free a dynamic string. 5 610 END 5 611 ELSE 4 612 BEGIN XMEM XPO$FREE_MEM - XPORT Dynamic Me 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 13 V1.3-21 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 5 613 5 614 IF (.element_addr AND 7) NEQ 0 ! If the memory element is not 8-byte aligned, 5 615 THEN ! (quadword aligned) 5 616 $XPO_QUIT( BAD_ALIGN ); ! return an error code to the caller. 5 617 5 618 IF NOT LIB$FREE_VM( element_size, element_addr ) ! Free binary dynamic memory. 5 619 THEN 5 620 $XPO_QUIT( BAD_ADDR ); 5 621 END 5 622 %ELSE U 5 623 %IF %BLISS(BLISS36) %THEN U 5 624 U 5 625 funct$ ( function, error, status ); ! test to see if we are linked standalone or with OTS U 5 626 U 5 627 IF .status EQLU -1 ! linked with object time system U 5 628 THEN U 5 629 BEGIN ! use FUNCT. memory management U 5 630 function = %o'7'; ! F.ROT (Return Object Time memory) U 5 631 U 5 632 IF .string[STR$B_DTYPE] NEQ XPO$K_DTYPE_BU ! If this is a TOPS-10/TOPS-20 character element U 5 633 THEN ! deallocation, U 5 634 BEGIN U 5 635 mem_size = (.element_size+4)/5; ! deallocate enough words (5 characters/word). U 5 636 mem_address = .element_addr<0,18,0> + 1; U 5 637 funct$ ( function, error, status, U 5 638 mem_address, ! address of allocated memory U 5 639 mem_size ); ! size to be deallocated, in words U 5 640 END U 5 641 ELSE U 5 642 BEGIN U 5 643 mem_size = .element_size; ! Otherwise, deallocate the specified number of U 5 644 mem_address = .element_addr; ! units. U 5 645 funct$ ( function, error, status, U 5 646 mem_address, ! address of allocated memory U 5 647 mem_size ); ! size to be deallocated, in words U 5 648 END; U 5 649 U 5 650 IF .status NEQU 0 ! Heap storage deallocation failed, U 5 651 THEN ! status=1 if wasn't allocated, status=3 if size or address > 256k U 5 652 $XPO_QUIT( BAD_ADDR ); ! either way, assume the address is bad. U 5 653 END U 5 654 U 5 655 ELSE ! Not linked with an OTS, so use XHEAP U 5 656 U 5 657 BEGIN U 5 658 IF .string[STR$B_DTYPE] NEQ XPO$K_DTYPE_BU ! If this is a TOPS-10/TOPS-20 character element U 5 659 THEN ! deallocation, U 5 660 status = XPO$$FREE_MEM( (.element_size+4)/5, ! deallocate enough words (5 characters/word). U 5 661 .element_addr<0,18,0> + 1 ) U 5 662 ELSE U 5 663 status = XPO$$FREE_MEM( .element_size, ! Otherwise, deallocate the specified number of units. U 5 664 .element_addr ); U 5 665 U 5 666 IF NOT .status ! If heap storage deallocation failed, U 5 667 THEN ! U 5 668 $XPO_QUIT( (.status) ); ! return the XPO$$FREE_MEM error code to the caller. U 5 669 END; XMEM XPO$FREE_MEM - XPORT Dynamic Me 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 14 V1.3-21 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 U 5 670 U 5 671 %ELSE U 5 672 U 5 673 status = XPO$$FREE_MEM( .element_size, ! Otherwise, deallocate the specified number of units. U 5 674 .element_addr ); U 5 675 U 5 676 IF NOT .status ! If heap storage deallocation failed, U 5 677 THEN ! U 5 678 $XPO_QUIT( (.status) ); ! return the XPO$$FREE_MEM error code to the caller. U 5 679 U 5 680 %FI U 5 681 %FI 5 682 5 683 END; 3 684 3 685 ! 3 686 ! Zero the descriptor length and pointer fields. 3 687 ! 3 688 3 689 ! Zero the following descriptor fields: 3 690 string[STR$H_LENGTH] = 0; ! string/data length 3 691 string[STR$A_POINTER] = 0; ! string pointer / data address 3 692 IF .string[STR$B_CLASS] EQL STR$K_CLASS_B OR ! 3 693 .string[STR$B_CLASS] EQL STR$K_CLASS_DB ! 3 694 THEN ! 3 695 BEGIN ! 4 696 string[STR$H_MAXLEN] = 0; ! maximum string/data length 4 697 string[STR$H_PFXLEN] = 0; ! prefix length 4 698 END; 3 699 3 700 $XPO_QUIT( NORMAL ); ! Indicate successful storage deallocation. 3 701 3 702 ! 3 703 ! XPORT routine termination. 3 704 ! 3 705 3 706 $XPO_MAIN_END; ! Terminate MAIN_BLOCK. 2 707 2 708 $XPO_ACTION_RTN( desc[$BASE] ); ! Call a success or failure action routine. 2 709 2 710 ! 2 711 ! Return the final completion code to the caller. 2 712 ! 2 713 2 714 RETURN .primary_code ! Return the final completion code to the caller. 2 715 2 716 END; 1 717 END 1 718 ELUDOM XMEM Machine Code Listing 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 15 V1.3-21 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 .psect _XPO$CODE, CON, LCL, SHR, EXE, NOWRT, NOVEC .proc XPO$ALLOC_MEM .align 32 .global XPO$ALLOC_MEM XPO$ALLOC_MEM: // 000098 { .mmi 0119F8CE0300 0000 adds r12 = -16, r12 ;; 010800C303C0 0001 adds r15 = 24, r12 000008000000 0002 nop.i 0 ;; } { .mii 002C03473480 0010 alloc r82 = rspfs, 6, 46, 5, 0 0000B21000C0 0011 sxt4 r3 = DESC // r3 = r33 // 000222 010800000A40 0012 mov SECONDARY_CODE = r0 ;; // r41 = r0 // 000204 } { .mmi 010800300A00 0020 mov r40 = r3 // 000222 008C80F40000 0021 st4 [r15] = r32 // 000098 000188001440 0022 mov r81 = br0 } { .mib 0108003040C0 0030 adds r3 = 2, r3 // 000222 0108001014C0 0031 mov r83 = r1 // 000098 004000000000 0032 nop.b 0 ;; } { .mmi 008000300200 0040 ld1 r8 = [r3] ;; // 000222 01CC3081C1C0 0041 cmp4.eq pr7, pr6 = 14, r8 // 000223 01CC40804240 0042 cmp4.eq pr9, pr8 = 2, r8 ;; // 000222 } { .mii 01C0000012C7 0050 (pr7) cmp.eq.unc pr11, pr0 = r0, r0 // 000223 01C000001286 0051 (pr6) cmp.eq.unc pr10, pr0 = r0, r0 ;; 01C24000024B 0052 (pr11) cmp.eq.or.andcm pr9, pr8 = r0, r0 // 000222 } { .bbb 008600002008 0060 (pr8) br.cond.dpnt.few L$42 004000000000 0061 nop.b 0 008600008009 0062 (pr9) br.cond.dpnt.few L$43 } 0070 L$42: { .mlx 000008000000 0070 nop.m 0 000000000000 0071 movl PRIMARY_CODE = 2138154 // r8 = 2138154 // 000225 0194004A84 } { .mlx 000008000000 0080 nop.m 0 800000000000 0081 movl SECONDARY_CODE = 2138186 // r41 = 2138186 0194005294 } { .mfb 000008000000 0090 nop.m 0 000008000000 0091 nop.f 0 00800009C000 0092 br.sptk.few L$44 ;; } 00A0 L$43: // 000222 XMEM Machine Code Listing 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 16 V1.3-21 XPO$ALLOC_MEM 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 { .mii 010802806A00 00A0 adds r40 = 3, r40 // 000227 01200807CA80 00A1 mov r42 = 190 // 000228 01200807A280 00A2 mov r10 = 189 ;; // 000229 } { .mmi 00B00A8FA240 00B0 ld1 r9 = [r40], -3 ;; // 000227 01C402A123C0 00B1 cmp4.eq pr15, pr0 = r9, r42 // 000228 01CC60904340 00B2 cmp4.eq pr13, pr12 = 2, r9 ;; // 000227 } { .mii 01C400A121C0 00C0 cmp4.eq pr7, pr0 = r9, r10 // 000229 01C26000034F 00C1 (pr15) cmp.eq.or.andcm pr13, pr12 = r0, r0 ;; // 000227 01C260000347 00C2 (pr7) cmp.eq.or.andcm pr13, pr12 = r0, r0 // 000228 } { .bbb 00860000200C 00D0 (pr12) br.cond.dpnt.few L$45 // 000227 004000000000 00D1 nop.b 0 00860000800D 00D2 (pr13) br.cond.dpnt.few L$46 } 00E0 L$45: { .mlx 000008000000 00E0 nop.m 0 000000000000 00E1 movl PRIMARY_CODE = 2138154 // r8 = 2138154 // 000231 0194004A84 } { .mlx 000008000000 00F0 nop.m 0 800000000000 00F1 movl SECONDARY_CODE = 2138802 // r41 = 2138802 0194504C94 } { .mfb 000008000000 0100 nop.m 0 000008000000 0101 nop.f 0 00800008E000 0102 br.sptk.few L$44 ;; } 0110 L$46: // 000227 { .mmi 010802808A00 0110 adds r40 = 4, r40 ;; // 000233 00B08A8F82C0 0111 ld4 r11 = [r40], -4 000008000000 0112 nop.i 0 ;; } { .mfb 01C400B00240 0120 cmp4.eq pr9, pr0 = r0, r11 000008000000 0121 nop.f 0 008600008009 0122 (pr9) br.cond.dpnt.few L$48 } { .mlx 000008000000 0130 nop.m 0 000000000000 0131 movl PRIMARY_CODE = 2138154 // r8 = 2138154 // 000235 0194004A84 } { .mlx 000008000000 0140 nop.m 0 800000000000 0141 movl SECONDARY_CODE = 2138114 // r41 = 2138114 0194004094 } XMEM Machine Code Listing 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 17 V1.3-21 XPO$ALLOC_MEM 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 { .mfb 000008000000 0150 nop.m 0 000008000000 0151 nop.f 0 008000084000 0152 br.sptk.few L$44 ;; } 0160 L$48: // 000233 { .mmi 010800C30440 0160 adds r17 = 24, r12 ;; // 000241 008081100440 0161 ld4 r17 = [r17] 000008000000 0162 nop.i 0 ;; } { .mbb 01C471100000 0170 cmp4.eq pr0, pr14 = r0, r17 00860000200E 0171 (pr14) br.cond.dpnt.few L$49 00800007E000 0172 br.sptk.few L$62 ;; } 0180 L$49: { .mfb 000008000000 0180 nop.m 0 000008000000 0181 nop.f 0 00860001200A 0182 (pr10) br.cond.dpnt.few L$51 // 000246 } { .mii 010800C30540 0190 adds r21 = 24, r12 // 000252 010800C204C0 0191 adds r19 = 16, r12 // 000250 000008000000 0192 nop.i 0 } { .mlx 010800C28500 01A0 adds r20 = 20, r12 000000000008 01A1 movl r18 = 34471936 ;; 0180070009 } { .mii 012000004640 01B0 mov r25 = 2 // 000252 0000B1501500 01B1 sxt4 r84 = r21 010800C20540 01B2 adds r21 = 16, r12 ;; } { .mib 008C81324000 01C0 st4 [r19] = r18 // 000250 0000B1501540 01C1 sxt4 r85 = r21 // 000252 004000000000 01C2 nop.b 0 } { .mfb 008C81400000 01D0 st4 [r20] = r0 // 000250 000008000000 01D1 nop.f 0 00A000001000 01D2 br.call.sptk.many br0 = LIB$SGET1_DD // 000252 } { .mii 010800C28AC0 01E0 adds r43 = 20, r12 // 000253 010805300040 01E1 mov r1 = r83 // 000252 000008000000 01E2 nop.i 0 ;; } { .mii 008082B00AC0 01F0 ld4 r43 = [r43] // 000253 010802808A00 01F1 adds r40 = 4, r40 000008000000 01F2 nop.i 0 ;; } XMEM Machine Code Listing 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 18 V1.3-21 XPO$ALLOC_MEM 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 { .mfb 00BC8A857F00 0200 st4 [r40] = r43, -4 000008000000 0201 nop.f 0 00800000A000 0202 br.sptk.few L$53 ;; // 000249 } 0210 L$51: // 000246 { .mii 010800C30B80 0210 adds r46 = 24, r12 // 000256 010802108B40 0211 adds r45 = 4, DESC // r45 = 4, r33 012000004640 0212 mov r25 = 2 ;; } { .mii 000008000000 0220 nop.m 0 0000B2D01540 0221 sxt4 r85 = r45 0000B2E01500 0222 sxt4 r84 = r46 } { .mfb 000008000000 0230 nop.m 0 000008000000 0231 nop.f 0 00A000001000 0232 br.call.sptk.many br0 = LIB$GET_VM } { .mfi 010805300040 0240 mov r1 = r83 000008000000 0241 nop.f 0 000008000000 0242 nop.i 0 } 0250 L$53: // 000246 { .mib 000008000000 0250 nop.m 0 00A0308001C0 0251 tbit.z pr7, pr6 = STATUS, 0 // pr7, pr6 = r8, 0 // 000258 00860000A006 0252 (pr6) br.cond.dpnt.few L$54 ;; } { .mlx 012000100BC0 0260 add r47 = @ltoff(LIB$_INSVIRMEM), r1 // 000260 800000000000 0261 movl r49 = 2146316 ;; // 000264 0198004318 } { .mlx 0080C2F00BC0 0270 ld8 r47 = LIB$_INSVIRMEM // r47 = [r47] // 000260 000000000000 0271 movl r50 = 2138490 ;; // 000264 0194205E99 } { .mmi 01C442F10000 0280 cmp4.eq pr0, pr8 = STATUS, r47 ;; // pr0, pr8 = r8, r47 // 000260 010803100C88 0281 (pr8) mov r50 = r49 // 000264 000008000000 0282 nop.i 0 ;; } { .mfb 010803200200 0290 mov PRIMARY_CODE = r50 // r8 = r50 000008000000 0291 nop.f 0 00800005C000 0292 br.sptk.few L$44 ;; } 02A0 L$54: // 000258 { .mmi 010802806A00 02A0 adds r40 = 3, r40 ;; // 000331 00B00A8FACC0 02A1 ld1 r51 = [r40], -3 000008000000 02A2 nop.i 0 ;; XMEM Machine Code Listing 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 19 V1.3-21 XPO$ALLOC_MEM 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 } { .mfb 01C44AA66280 02B0 cmp4.eq pr10, pr9 = r51, r42 000008000000 02B1 nop.f 0 008600008009 02B2 (pr9) br.cond.dpnt.few L$56 } { .mmi 010800C30D40 02C0 adds r53 = 24, r12 // 000335 00AC42800200 02C1 st2 [r40] = r0, 8 // 000334 000008000000 02C2 nop.i 0 ;; } { .mmi 008083500D40 02D0 ld4 r53 = [r53] ;; // 000335 00BC4A86BE00 02D1 st2 [r40] = r53, -8 000008000000 02D2 nop.i 0 } { .mfb 000008000000 02E0 nop.m 0 000008000000 02E1 nop.f 0 008000006000 02E2 br.sptk.few L$58 ;; // 000331 } 02F0 L$56: { .mmi 010800C30DC0 02F0 adds r55 = 24, r12 ;; // 000338 008083700DC0 02F1 ld4 r55 = [r55] 000008000000 02F2 nop.i 0 ;; } { .mfi 008C4286E000 0300 st2 [r40] = r55 000008000000 0301 nop.f 0 000008000000 0302 nop.i 0 } 0310 L$58: // 000331 { .mfb 01DC022FE300 0310 cmp4.eq pr12, pr0 = -1, FILL_INDICATOR // pr12, pr0 = -1, r34 // 000344 000008000000 0311 nop.f 0 00860004A00C 0312 (pr12) br.cond.dpnt.few L$62 } { .mmi 010802804A00 0320 adds r40 = 2, r40 ;; // 000346 00B00A8FCE40 0321 ld1 r57 = [r40], -2 000008000000 0322 nop.i 0 ;; } { .mfb 01CC03904380 0330 cmp4.eq pr14, pr0 = 2, r57 000008000000 0331 nop.f 0 00860000C00E 0332 (pr14) br.cond.dpnt.few L$66 } { .mii 010800C30F00 0340 adds r60 = 24, r12 // 000348 010802808A00 0341 adds r40 = 4, r40 // 000349 0120080FEEC0 0342 mov r59 = 255 ;; // 000348 } { .mib 008083C01540 0350 ld4 r85 = [r60] 0000923008C0 0351 zxt4 r35 = FILL_VALUE // r35 = r35 004000000000 0352 nop.b 0 ;; XMEM Machine Code Listing 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 20 V1.3-21 XPO$ALLOC_MEM 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 } { .mii 00B08A8F8E80 0360 ld4 r58 = [r40], -4 // 000349 010063B468C0 0361 and r35 = r35, r59 // 000348 0000B5501540 0362 sxt4 r85 = r85 ;; } { .mib 010802301580 0370 mov r86 = r35 0000B3A01500 0371 sxt4 r84 = r58 // 000349 00A000001000 0372 br.call.sptk.many br0 = OTS$FILL // 000348 } { .mfb 010805300040 0380 mov r1 = r83 000008000000 0381 nop.f 0 00800003C000 0382 br.sptk.few L$62 ;; // 000346 } 0390 L$66: { .mfb 01CC32202000 0390 cmp4.eq pr0, pr6 = 1, FILL_INDICATOR // pr0, pr6 = 1, r34 // 000351 000008000000 0391 nop.f 0 00860000C006 0392 (pr6) br.cond.dpnt.few L$71 } { .mii 010800C30FC0 03A0 adds r63 = 24, r12 // 000354 010802808A00 03A1 adds r40 = 4, r40 0120080FEF80 03A2 mov r62 = 255 ;; // 000353 } { .mib 008083F01540 03B0 ld4 r85 = [r63] // 000354 0000923008C0 03B1 zxt4 r35 = FILL_VALUE // r35 = r35 // 000353 004000000000 03B2 nop.b 0 ;; } { .mii 00B08A8F8F40 03C0 ld4 r61 = [r40], -4 // 000354 010063E468C0 03C1 and r35 = r35, r62 // 000353 0000B5501540 03C2 sxt4 r85 = r85 ;; } { .mib 010802301580 03D0 mov r86 = r35 0000B3D01500 03D1 sxt4 r84 = r61 // 000354 00A000001000 03D2 br.call.sptk.many br0 = OTS$FILL // 000353 } { .mfb 010805300040 03E0 mov r1 = r83 000008000000 03E1 nop.f 0 008000030000 03E2 br.sptk.few L$62 ;; // 000351 } 03F0 L$71: // 000357 { .mii 010800C31000 03F0 adds r64 = 24, r12 // 000358 010802808A00 03F1 adds r40 = 4, r40 // 000357 010800001100 03F2 mov INDEX = r0 ;; // r68 = r0 // 000358 } { .mmi 008084001000 0400 ld4 r64 = [r64] 00B08A8F90C0 0401 ld4 r67 = [r40], -4 // 000357 000008000000 0402 nop.i 0 ;; XMEM Machine Code Listing 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 21 V1.3-21 XPO$ALLOC_MEM 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 } { .mii 0119FC0FF080 0410 adds r66 = -1, r64 // 000358 0000B43010C0 0411 sxt4 r67 = r67 ;; // 000357 018400084180 0412 cmp4.lt pr6, pr0 = r66, r0 // 000358 } { .mmi 010804207040 0420 adds r65 = 3, r66 ;; 010804101086 0421 (pr6) mov r66 = r65 000008000000 0422 nop.i 0 ;; } { .mii 000008000000 0430 nop.m 0 0000B4201080 0431 sxt4 r66 = r66 ;; 00A5EC20B080 0432 shr r66 = r66, 2 ;; } { .mfb 0184000841C0 0440 cmp4.lt pr7, pr0 = r66, r0 000008000000 0441 nop.f 0 008600024007 0442 (pr7) br.cond.dpnt.few L$62 } { .mii 0119FC2F7140 0450 adds r69 = -5, r66 010800001180 0451 mov r70 = r0 ;; // 000359 01840008A300 0452 cmp4.lt pr12, pr0 = r69, r0 // 000358 } { .mmi 01844C584280 0460 cmp4.lt pr10, pr9 = r66, r69 ;; 01C24800028C 0461 (pr12) cmp.eq.or.andcm pr10, pr9 = r0, r0 000008000000 0462 nop.i 0 } { .bbb 008600002009 0470 (pr9) br.cond.dpnt.few L$78 004000000000 0471 nop.b 0 00860001800A 0472 (pr10) br.cond.dpnt.few L$80 ;; } 0480 L$78: { .mii 0108046091C0 0480 adds r71 = 4, r70 // 000359 010804619240 0481 adds r73 = 12, r70 010804611200 0482 adds r72 = 8, r70 } { .mii 01080440D100 0490 adds r68 = 6, r68 // 000358 0000B4601280 0491 sxt4 r74 = r70 // 000359 0108046212C0 0492 adds r75 = 16, r70 ;; } { .mii 010804629300 04A0 adds r76 = 20, r70 010804631180 04A1 adds r70 = 24, r70 0000B47011C0 04A2 sxt4 r71 = r71 } { .mii 010004A87280 04B0 add r74 = r67, r74 0000B4801200 04B1 sxt4 r72 = r72 0000B4901240 04B2 sxt4 r73 = r73 ;; } XMEM Machine Code Listing 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 22 V1.3-21 XPO$ALLOC_MEM 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 { .mii 0100047871C0 04C0 add r71 = r67, r71 0000B4B012C0 04C1 sxt4 r75 = r75 0000B4C01300 04C2 sxt4 r76 = r76 ;; } { .mii 010004887200 04D0 add r72 = r67, r72 010004987240 04D1 add r73 = r67, r73 010004B872C0 04D2 add r75 = r67, r75 } { .mmi 010004C87300 04E0 add r76 = r67, r76 008C84A46000 04E1 st4 [r74] = FILL_VALUE // [r74] = r35 01846C48A000 04E2 cmp4.lt pr0, pr13 = r69, INDEX ;; // pr0, pr13 = r69, r68 // 000358 } { .mmi 008C84746000 04F0 st4 [r71] = FILL_VALUE // [r71] = r35 // 000359 008C84846000 04F1 st4 [r72] = FILL_VALUE // [r72] = r35 000008000000 04F2 nop.i 0 } { .mmi 008C84946000 0500 st4 [r73] = FILL_VALUE // [r73] = r35 008C84B46000 0501 st4 [r75] = FILL_VALUE // [r75] = r35 000008000000 0502 nop.i 0 } { .mfb 008C84C46000 0510 st4 [r76] = FILL_VALUE // [r76] = r35 000008000000 0511 nop.f 0 0095FFFEE00D 0512 (pr13) br.cond.dptk.few L$78 // 000358 } { .mfb 018404484180 0520 cmp4.lt pr6, pr0 = r66, INDEX // pr6, pr0 = r66, r68 000008000000 0521 nop.f 0 008600008006 0522 (pr6) br.cond.dpnt.few L$62 ;; } 0530 L$80: { .mii 010804403100 0530 adds r68 = 1, r68 0000B4601340 0531 sxt4 r77 = r70 // 000359 010804609180 0532 adds r70 = 4, r70 ;; } { .mii 010004D87340 0540 add r77 = r67, r77 01843C484000 0541 cmp4.lt pr0, pr7 = r66, INDEX // pr0, pr7 = r66, r68 // 000358 000008000000 0542 nop.i 0 ;; } { .mfb 008C84D46000 0550 st4 [r77] = FILL_VALUE // [r77] = r35 // 000359 000008000000 0551 nop.f 0 0095FFFFC007 0552 (pr7) br.cond.dptk.few L$80 // 000358 } 0560 L$62: // 000344 { .mlx 000008000000 0560 nop.m 0 000000000000 0561 movl PRIMARY_CODE = 2129921 ;; // r8 = 2129921 // 000362 0190004044 } XMEM Machine Code Listing 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 23 V1.3-21 XPO$ALLOC_MEM 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 0570 L$44: // 000204 { .mii 000008000000 0570 nop.m 0 00A058800300 0571 tbit.z pr12, pr11 = PRIMARY_CODE, 0 ;; // pr12, pr11 = r8, 0 // 000370 01C00000124B 0572 (pr11) cmp.eq.unc pr9, pr0 = r0, r0 } { .mfb 000008000000 0580 nop.m 0 000008000000 0581 nop.f 0 008600004009 0582 (pr9) br.cond.dpnt.few L$81 } { .mmi 010802808A00 0590 adds r40 = 4, r40 ;; // 000372 008C82800000 0591 st4 [r40] = r0 000008000000 0592 nop.i 0 } 05A0 L$81: // 000374 { .mmi 010802501380 05A0 mov r78 = FAILURE_ACTION ;; // r78 = r37 010802401389 05A1 (pr9) mov r78 = SUCCESS_ACTION // r78 = r36 000008000000 05A2 nop.i 0 ;; } { .mfb 01C404E00380 05B0 cmp4.eq pr14, pr0 = r0, $XPO$ACTION // pr14, pr0 = r0, r78 000008000000 05B1 nop.f 0 00860000E00E 05B2 (pr14) br.cond.dpnt.few L$84 } { .mii 012000008640 05C0 mov r25 = 4 0000B4E01380 05C1 sxt4 r78 = $XPO$ACTION // r78 = r78 0000B21015C0 05C2 sxt4 r87 = DESC // r87 = r33 } { .mii 012000007500 05D0 mov r84 = 3 0000B2901580 05D1 sxt4 r86 = SECONDARY_CODE // r86 = r41 0000B0801540 05D2 sxt4 r85 = PRIMARY_CODE ;; // r85 = r8 } { .mmi 010804E11380 05E0 adds r78 = 8, r78 ;; 00B0CCEF0040 05E1 ld8 r1 = [r78], -8 000008000000 05E2 nop.i 0 ;; } { .mmi 0080C4E01380 05F0 ld8 r78 = [r78] ;; 000008000000 05F1 nop.m 0 000E0019C180 05F2 mov br6 = r78 } { .mfb 000008000000 0600 nop.m 0 000008000000 0601 nop.f 0 00210000C000 0602 br.call.sptk.few br0 = br6 ;; } { .mfi 010805300040 0610 mov r1 = r83 000008000000 0611 nop.f 0 000008000000 0612 nop.i 0 } XMEM Machine Code Listing 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 24 V1.3-21 XPO$ALLOC_MEM 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 0620 L$84: { .mii 000008000000 0620 nop.m 0 0000B0800200 0621 sxt4 r8 = r8 // 000380 0001540A4000 0622 mov.i rspfs = r82 ;; } { .mib 010800C20300 0630 adds r12 = 16, r12 000E001A2000 0631 mov br0 = r81 000108001100 0632 br.ret.sptk.many br0 ;; } .endp XPO$ALLOC_MEM Routine Size: 1600 bytes, Routine Base: _XPO$CODE + 0000 .proc XPO$FREE_MEM .align 32 .global XPO$FREE_MEM XPO$FREE_MEM: // 000388 { .mii 002C0316D3C0 0640 alloc r79 = rspfs, 5, 44, 5, 0 0000B20000C0 0641 sxt4 r3 = DESC // r3 = r32 // 000497 0119F8CC0300 0642 adds r12 = -32, r12 // 000388 } { .mii 010800000A40 0650 mov SECONDARY_CODE = r0 // r41 = r0 // 000495 000188001380 0651 mov r78 = br0 // 000388 010800101400 0652 mov r80 = r1 ;; } { .mii 010800300A00 0660 mov r40 = r3 // 000497 0108003040C0 0661 adds r3 = 2, r3 000008000000 0662 nop.i 0 ;; } { .mmi 008000300200 0670 ld1 r8 = [r3] ;; 01CC008041C0 0671 cmp4.eq pr7, pr0 = 2, r8 000008000000 0672 nop.i 0 } { .mfb 000008000000 0680 nop.m 0 000008000000 0681 nop.f 0 00860000A007 0682 (pr7) br.cond.dpnt.few L$5 } { .mib 012000002640 0690 mov r25 = 1 // 000499 0000B2001440 0691 sxt4 r81 = DESC // r81 = r32 00A000001000 0692 br.call.sptk.many br0 = XST$VALIDATE ;; } { .mib 010805000040 06A0 mov r1 = r80 00A0308001C0 06A1 tbit.z pr7, pr6 = $STR$STATUS, 0 // pr7, pr6 = r8, 0 008600006006 06A2 (pr6) br.cond.dpnt.few L$5 } { .mlx 010800800A40 06B0 mov SECONDARY_CODE = $STR$STATUS // r41 = r8 000000000000 06B1 movl PRIMARY_CODE = 2138154 // r42 = 2138154 XMEM Machine Code Listing 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 25 V1.3-21 XPO$FREE_MEM 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 0194004A95 } { .mfb 000008000000 06C0 nop.m 0 000008000000 06C1 nop.f 0 00800008A000 06C2 br.sptk.few L$7 ;; } 06D0 L$5: // 000497 { .mii 010802806A00 06D0 adds r40 = 3, r40 // 000515 01200807AB00 06D1 mov r44 = 189 000008000000 06D2 nop.i 0 ;; } { .mmi 00B00A8FAAC0 06E0 ld1 r43 = [r40], -3 ;; 01C402C562C0 06E1 cmp4.eq pr11, pr0 = r43, r44 01CC42B04240 06E2 cmp4.eq pr9, pr8 = 2, r43 ;; } { .mfb 01C24000000B 06F0 (pr11) cmp.eq.or.andcm pr0, pr8 = r0, r0 000008000000 06F1 nop.f 0 008600008008 06F2 (pr8) br.cond.dpnt.few L$8 } { .mii 00A042808B40 0700 ld2 r45 = [r40], 4 // 000520 010800C40B80 0701 adds r46 = 32, r12 010800C30BC0 0702 adds r47 = 24, r12 ;; // 000521 } { .mmi 008C82E5A000 0710 st4 [r46] = r45 // 000520 00B08A8F8B40 0711 ld4 r45 = [r40], -4 // 000521 000008000000 0712 nop.i 0 ;; } { .mfb 008C82F5A000 0720 st4 [r47] = r45 000008000000 0721 nop.f 0 00800001C000 0722 br.sptk.few L$10 ;; // 000515 } 0730 L$8: { .mmi 01200807CC00 0730 mov r48 = 190 ;; 01C463056000 0731 cmp4.eq pr0, pr12 = r43, r48 000008000000 0732 nop.i 0 } { .mfb 000008000000 0740 nop.m 0 000008000000 0741 nop.f 0 00860000C00C 0742 (pr12) br.cond.dpnt.few L$11 } { .mii 010802810A00 0750 adds r40 = 8, r40 // 000526 010800C40C80 0751 adds r50 = 32, r12 010800C30D00 0752 adds r52 = 24, r12 ;; // 000532 } { .mmi 00B04A8F8C40 0760 ld2 r49 = [r40], -4 ;; // 000526 008C83262000 0761 st4 [r50] = r49 XMEM Machine Code Listing 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 26 V1.3-21 XPO$FREE_MEM 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 000008000000 0762 nop.i 0 } { .mmi 00A08280CCC0 0770 ld4 r51 = [r40], 6 ;; // 000533 00B04A8ECC40 0771 ld2 r49 = [r40], -10 // 000534 000008000000 0772 nop.i 0 ;; } { .mmi 01002B166C40 0780 sub r49 = r51, r49 ;; 008C83462000 0781 st4 [r52] = r49 // 000532 000008000000 0782 nop.i 0 } { .mfb 000008000000 0790 nop.m 0 000008000000 0791 nop.f 0 00800000E000 0792 br.sptk.few L$10 ;; // 000527 } 07A0 L$11: // 000515 { .mii 01CC02B061C0 07A0 cmp4.eq pr7, pr0 = 3, r43 01CC72B023C0 07A1 cmp4.eq pr15, pr14 = 1, r43 ;; 01C270000007 07A2 (pr7) cmp.eq.or.andcm pr0, pr14 = r0, r0 } { .bbb 00860000200E 07B0 (pr14) br.cond.dpnt.few L$13 004000000000 07B1 nop.b 0 008000068000 07B2 br.sptk.few L$15 ;; } 07C0 L$13: { .mfb 01C452B00000 07C0 cmp4.eq pr0, pr10 = r0, r43 000008000000 07C1 nop.f 0 00860006600A 07C2 (pr10) br.cond.dpnt.few L$15 } { .mmi 008042800D40 07D0 ld2 r53 = [r40] ;; // 000541 01C443500000 07D1 cmp4.eq pr0, pr8 = r0, r53 000008000000 07D2 nop.i 0 } { .mfb 000008000000 07E0 nop.m 0 000008000000 07E1 nop.f 0 008600062008 07E2 (pr8) br.cond.dpnt.few L$15 } { .mmi 010800C40D80 07F0 adds r54 = 32, r12 ;; // 000543 008C83600000 07F1 st4 [r54] = r0 000008000000 07F2 nop.i 0 } 0800 L$10: // 000515 { .mii 010800C30E00 0800 adds r56 = 24, r12 // 000554 010800C40DC0 0801 adds r55 = 32, r12 // 000551 000008000000 0802 nop.i 0 ;; } { .mmi 008083800E00 0810 ld4 r56 = [r56] // 000554 XMEM Machine Code Listing 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 27 V1.3-21 XPO$FREE_MEM 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 008083701480 0811 ld4 r82 = [r55] // 000551 000008000000 0812 nop.i 0 ;; } { .mii 01C433800000 0820 cmp4.eq pr0, pr6 = r0, r56 // 000554 01C465200340 0821 cmp4.eq pr13, pr12 = r0, r82 ;; // 000551 01C200000346 0822 (pr6) cmp.eq.or.andcm pr13, pr0 = r0, r0 // 000554 } { .mfb 000008000000 0830 nop.m 0 000008000000 0831 nop.f 0 00860000800D 0832 (pr13) br.cond.dpnt.few L$19 } { .mlx 000008000000 0840 nop.m 0 000000000000 0841 movl PRIMARY_CODE = 2138154 // r42 = 2138154 // 000556 0194004A95 } { .mlx 000008000000 0850 nop.m 0 800000000000 0851 movl SECONDARY_CODE = 2138114 // r41 = 2138114 0194004094 } { .mfb 000008000000 0860 nop.m 0 000008000000 0861 nop.f 0 008000056000 0862 br.sptk.few L$7 ;; } 0870 L$19: // 000551 { .mib 000008000000 0870 nop.m 0 00A0721003C0 0871 tbit.z pr15, pr14 = FILL_FLAG, 0 // pr15, pr14 = r33, 0 // 000577 00860000A00F 0872 (pr15) br.cond.dpnt.few L$22 } { .mii 0120080FEE40 0880 mov r57 = 255 // 000583 000092200880 0881 zxt4 r34 = FILL_VALUE // r34 = r34 0000B5201480 0882 sxt4 r82 = r82 ;; } { .mii 010063944880 0890 and r34 = r34, r57 0000B3801440 0891 sxt4 r81 = r56 ;; 0108022014C0 0892 mov r83 = r34 } { .mfb 000008000000 08A0 nop.m 0 000008000000 08A1 nop.f 0 00A000001000 08A2 br.call.sptk.many br0 = OTS$FILL } { .mfi 010805000040 08B0 mov r1 = r80 000008000000 08B1 nop.f 0 000008000000 08B2 nop.i 0 } 08C0 L$22: // 000577 { .mmi 010800C40E80 08C0 adds r58 = 32, r12 ;; // 000593 XMEM Machine Code Listing 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 28 V1.3-21 XPO$FREE_MEM 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 008083A00E80 08C1 ld4 r58 = [r58] 000008000000 08C2 nop.i 0 ;; } { .mfb 01C403A001C0 08D0 cmp4.eq pr7, pr0 = r0, r58 000008000000 08D1 nop.f 0 008600034007 08D2 (pr7) br.cond.dpnt.few L$26 } { .mmi 010802804A00 08E0 adds r40 = 2, r40 ;; // 000597 00B00A8FCEC0 08E1 ld1 r59 = [r40], -2 000008000000 08E2 nop.i 0 ;; } { .mfb 01CC43B1C000 08F0 cmp4.eq pr0, pr8 = 14, r59 000008000000 08F1 nop.f 0 00860001A008 08F2 (pr8) br.cond.dpnt.few L$29 } { .mii 010800C30F00 0900 adds r60 = 24, r12 // 000603 010800C20FC0 0901 adds r63 = 16, r12 // 000601 000008000000 0902 nop.i 0 } { .mlx 010800C21000 0910 adds r64 = 16, r12 // 000602 000000000008 0911 movl r62 = 34471936 ;; // 000601 018007001F } { .mii 008083C00F00 0920 ld4 r60 = [r60] // 000603 010800C29040 0921 adds r65 = 20, r12 000008000000 0922 nop.i 0 ;; } { .mmi 008C83F7C000 0930 st4 [r63] = r62 // 000601 008C44074000 0931 st2 [r64] = r58 // 000602 010163C06F40 0932 and r61 = 3, r60 ;; // 000605 } { .mib 008C84178000 0940 st4 [r65] = r60 // 000603 01C403D002C0 0941 cmp4.eq pr11, pr0 = r0, r61 // 000605 00860000600B 0942 (pr11) br.cond.dpnt.few L$32 } { .mlx 000008000000 0950 nop.m 0 000000000000 0951 movl PRIMARY_CODE = 2138122 // r42 = 2138122 // 000607 0194004295 } { .mfb 000008000000 0960 nop.m 0 000008000000 0961 nop.f 0 008000036000 0962 br.sptk.few L$7 ;; } 0970 L$32: // 000605 { .mii 010800C21080 0970 adds r66 = 16, r12 // 000609 012000002640 0971 mov r25 = 1 ;; XMEM Machine Code Listing 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 29 V1.3-21 XPO$FREE_MEM 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 0000B4201440 0972 sxt4 r81 = r66 } { .mfb 000008000000 0980 nop.m 0 000008000000 0981 nop.f 0 00A000001000 0982 br.call.sptk.many br0 = LIB$SFREE1_DD } { .mib 010805000040 0990 mov r1 = r80 00A0308001C0 0991 tbit.z pr7, pr6 = r8, 0 00860001C006 0992 (pr6) br.cond.dpnt.few L$26 } { .mlx 000008000000 09A0 nop.m 0 000000000000 09A1 movl PRIMARY_CODE = 2138114 // r42 = 2138114 0194004095 } { .mfb 000008000000 09B0 nop.m 0 000008000000 09B1 nop.f 0 00800002C000 09B2 br.sptk.few L$7 ;; } 09C0 L$29: // 000597 { .mmi 010800C310C0 09C0 adds r67 = 24, r12 ;; // 000614 0080843010C0 09C1 ld4 r67 = [r67] 000008000000 09C2 nop.i 0 ;; } { .mmi 01016430F0C0 09D0 and r67 = 7, r67 ;; 01C404300240 09D1 cmp4.eq pr9, pr0 = r0, r67 000008000000 09D2 nop.i 0 } { .mfb 000008000000 09E0 nop.m 0 000008000000 09E1 nop.f 0 008600006009 09E2 (pr9) br.cond.dpnt.few L$35 } { .mlx 000008000000 09F0 nop.m 0 000000000000 09F1 movl PRIMARY_CODE = 2138122 // r42 = 2138122 // 000616 0194004295 } { .mfb 000008000000 0A00 nop.m 0 000008000000 0A01 nop.f 0 008000022000 0A02 br.sptk.few L$7 ;; } 0A10 L$35: // 000614 { .mii 010800C41100 0A10 adds r68 = 32, r12 // 000618 012000004640 0A11 mov r25 = 2 ;; 0000B4401440 0A12 sxt4 r81 = r68 } { .mmi 010800C31100 0A20 adds r68 = 24, r12 ;; 000008000000 0A21 nop.m 0 XMEM Machine Code Listing 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 30 V1.3-21 XPO$FREE_MEM 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 0000B4401480 0A22 sxt4 r82 = r68 } { .mfb 000008000000 0A30 nop.m 0 000008000000 0A31 nop.f 0 00A000001000 0A32 br.call.sptk.many br0 = LIB$FREE_VM } { .mib 010805000040 0A40 mov r1 = r80 00A0308001C0 0A41 tbit.z pr7, pr6 = r8, 0 008600006006 0A42 (pr6) br.cond.dpnt.few L$26 } { .mlx 000008000000 0A50 nop.m 0 000000000000 0A51 movl PRIMARY_CODE = 2138114 // r42 = 2138114 // 000620 0194004095 } { .mfb 000008000000 0A60 nop.m 0 000008000000 0A61 nop.f 0 008000016000 0A62 br.sptk.few L$7 ;; } 0A70 L$26: // 000593 { .mii 010802806A00 0A70 adds r40 = 3, r40 // 000692 01200807D180 0A71 mov r70 = 190 // 000693 000008000000 0A72 nop.i 0 ;; } { .mmi 00A002803140 0A80 ld1 r69 = [r40], 1 ;; // 000692 00BC8A801F00 0A81 st4 [r40] = r0, -4 // 000691 01C40468A280 0A82 cmp4.eq pr10, pr0 = r69, r70 ;; // 000693 } { .mmi 01CC4C506200 0A90 cmp4.eq pr8, pr9 = 3, r69 // 000692 008C42800000 0A91 st2 [r40] = r0 // 000690 000008000000 0A92 nop.i 0 ;; } { .mbb 01C24800020A 0AA0 (pr10) cmp.eq.or.andcm pr8, pr9 = r0, r0 // 000692 008600002008 0AA1 (pr8) br.cond.dpnt.few L$37 008600006009 0AA2 (pr9) br.cond.dpnt.few L$38 } 0AB0 L$37: { .mmi 010802814A00 0AB0 adds r40 = 10, r40 ;; // 000697 00BC4A801F80 0AB1 st2 [r40] = r0, -2 000008000000 0AB2 nop.i 0 ;; } { .mfi 008C42800000 0AC0 st2 [r40] = r0 // 000696 000008000000 0AC1 nop.f 0 000008000000 0AC2 nop.i 0 } 0AD0 L$38: // 000692 { .mlx 000008000000 0AD0 nop.m 0 XMEM Machine Code Listing 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 31 V1.3-21 XPO$FREE_MEM 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 000000000000 0AD1 movl PRIMARY_CODE = 2129921 // r42 = 2129921 // 000700 0190004055 } { .mfb 000008000000 0AE0 nop.m 0 000008000000 0AE1 nop.f 0 008000006000 0AE2 br.sptk.few L$7 ;; } 0AF0 L$15: // 000515 { .mlx 000008000000 0AF0 nop.m 0 800000000000 0AF1 movl SECONDARY_CODE = 2138802 // r41 = 2138802 // 000548 0194504C94 } { .mlx 000008000000 0B00 nop.m 0 000000000000 0B01 movl PRIMARY_CODE = 2138154 // r42 = 2138154 0194004A95 } 0B10 L$7: // 000708 { .mmi 0108024012C0 0B10 mov r75 = FAILURE_ACTION ;; // r75 = r36 000008000000 0B11 nop.m 0 00A062A00000 0B12 tbit.z pr0, pr12 = PRIMARY_CODE, 0 ;; // pr0, pr12 = r42, 0 } { .mmi 0108023012CC 0B20 (pr12) mov r75 = SUCCESS_ACTION ;; // r75 = r35 01C404B00380 0B21 cmp4.eq pr14, pr0 = r0, $XPO$ACTION // pr14, pr0 = r0, r75 000008000000 0B22 nop.i 0 } { .mfb 000008000000 0B30 nop.m 0 000008000000 0B31 nop.f 0 00860000E00E 0B32 (pr14) br.cond.dpnt.few L$40 } { .mii 012000008640 0B40 mov r25 = 4 0000B4B012C0 0B41 sxt4 r75 = $XPO$ACTION // r75 = r75 0000B2001500 0B42 sxt4 r84 = DESC // r84 = r32 } { .mii 012000009440 0B50 mov r81 = 4 0000B29014C0 0B51 sxt4 r83 = SECONDARY_CODE // r83 = r41 0000B2A01480 0B52 sxt4 r82 = PRIMARY_CODE ;; // r82 = r42 } { .mmi 010804B112C0 0B60 adds r75 = 8, r75 ;; 00B0CCBF0040 0B61 ld8 r1 = [r75], -8 000008000000 0B62 nop.i 0 ;; } { .mmi 0080C4B012C0 0B70 ld8 r75 = [r75] ;; 000008000000 0B71 nop.m 0 000E00196180 0B72 mov br6 = r75 } { .mfb 000008000000 0B80 nop.m 0 XMEM Machine Code Listing 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 32 V1.3-21 XPO$FREE_MEM 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 000008000000 0B81 nop.f 0 00210000C000 0B82 br.call.sptk.few br0 = br6 } { .mii 010800800A80 0B90 mov PRIMARY_CODE = r8 // r42 = r8 010805000040 0B91 mov r1 = r80 000008000000 0B92 nop.i 0 ;; } 0BA0 L$40: { .mib 000008000000 0BA0 nop.m 0 0000B2A00200 0BA1 sxt4 r8 = PRIMARY_CODE // r8 = r42 // 000714 004000000000 0BA2 nop.b 0 } { .mii 000008000000 0BB0 nop.m 0 00015409E000 0BB1 mov.i rspfs = r79 010800C40300 0BB2 adds r12 = 32, r12 ;; } { .mib 000008000000 0BC0 nop.m 0 000E0019C000 0BC1 mov br0 = r78 000108001100 0BC2 br.ret.sptk.many br0 ;; } .endp XPO$FREE_MEM Routine Size: 1424 bytes, Routine Base: _XPO$CODE + 0640 .section .data .type LIB$SGET1_DD, @function .global LIB$SGET1_DD .section .data .type LIB$GET_VM, @function .global LIB$GET_VM .global LIB$_INSVIRMEM .section .data .type OTS$FILL, @function .global OTS$FILL .section .data .type XST$VALIDATE, @function .global XST$VALIDATE .section .data .type LIB$SFREE1_DD, @function .global LIB$SFREE1_DD .section .data .type LIB$FREE_VM, @function .global LIB$FREE_VM ; Library Statistics ; ; -------- Symbols -------- Pages ; File Total Loaded Percent Mapped ; ; DISK$NORMS_OWN:[LASTOVICA.XPORT.VMSGEN]XPORT.L32;14 ; 590 54 9 270 ; DISK$NORMS_OWN:[LASTOVICA.XPORT.VMSGEN]XPOSYS.L32;14 Source Listing 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 33 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 ; 91 18 19 27 Source Listing 4-FEB-2004 11:01:37 BLISS-32I T1.1-053 Page 34 Source Listing 19-MAR-2002 10:12:13 [LASTOVICA.XPORT.VMSGEN]XMEM.BLI;1 COMMAND LINE: BLISSXMEM/VARIANT=3/LIST/DEBUG