=============================================================================== 4000aad8 : Heap_Control *RTEMS_Malloc_Initialize( const Memory_Information *mem, Heap_Initialization_or_extend_handler extend ) { 4000aad8: 9d e3 bf a0 save %sp, -96, %sp Heap_Initialization_or_extend_handler init_or_extend; uintptr_t page_size; size_t i; heap = &_Malloc_Heap; RTEMS_Malloc_Heap = heap; 4000aadc: 03 10 00 72 sethi %hi(0x4001c800), %g1 4000aae0: 21 10 00 73 sethi %hi(0x4001cc00), %l0 4000aae4: a0 14 20 80 or %l0, 0x80, %l0 ! 4001cc80 <_Malloc_Heap> 4000aae8: e0 20 60 28 st %l0, [ %g1 + 0x28 ] init_or_extend = _Heap_Initialize; page_size = CPU_HEAP_ALIGNMENT; for (i = 0; i < _Memory_Get_count( mem ); ++i) { 4000aaec: c2 06 00 00 ld [ %i0 ], %g1 4000aaf0: 80 a0 60 00 cmp %g1, 0 4000aaf4: 02 80 00 1e be 4000ab6c <== NEVER TAKEN 4000aaf8: 23 10 00 20 sethi %hi(0x40008000), %l1 4000aafc: b6 10 20 00 clr %i3 init_or_extend = _Heap_Initialize; 4000ab00: a2 14 62 70 or %l1, 0x270, %l1 for (i = 0; i < _Memory_Get_count( mem ); ++i) { 4000ab04: b8 10 20 00 clr %i4 init_or_extend = _Heap_Initialize; 4000ab08: b4 10 00 11 mov %l1, %i2 const Memory_Information *information, size_t index ) { _Assert( index < _Memory_Get_count( information ) ); return &information->areas[ index ]; 4000ab0c: fa 06 20 04 ld [ %i0 + 4 ], %i5 4000ab10: ba 07 40 1b add %i5, %i3, %i5 * * @return The free memory area begin the memory area. */ RTEMS_INLINE_ROUTINE void *_Memory_Get_free_begin( const Memory_Area *area ) { return area->free; 4000ab14: d2 07 60 04 ld [ %i5 + 4 ], %o1 * * @return The free memory area size in bytes of the memory area. */ RTEMS_INLINE_ROUTINE uintptr_t _Memory_Get_free_size( const Memory_Area *area ) { return (uintptr_t) area->end - (uintptr_t) area->free; 4000ab18: d4 07 60 08 ld [ %i5 + 8 ], %o2 Memory_Area *area; uintptr_t space_available; area = _Memory_Get_area( mem, i ); space_available = ( *init_or_extend )( 4000ab1c: 96 10 20 08 mov 8, %o3 4000ab20: 94 22 80 09 sub %o2, %o1, %o2 4000ab24: 9f c6 80 00 call %i2 4000ab28: 90 10 00 10 mov %l0, %o0 _Memory_Get_free_begin( area ), _Memory_Get_free_size( area ), page_size ); if ( space_available > 0 ) { 4000ab2c: 80 a2 20 00 cmp %o0, 0 4000ab30: 22 80 00 06 be,a 4000ab48 4000ab34: c2 06 00 00 ld [ %i0 ], %g1 RTEMS_INLINE_ROUTINE void _Memory_Consume( Memory_Area *area, uintptr_t consume ) { area->free = (char *) area->free + consume; 4000ab38: c2 07 60 08 ld [ %i5 + 8 ], %g1 4000ab3c: c2 27 60 04 st %g1, [ %i5 + 4 ] _Memory_Consume( area, _Memory_Get_free_size( area ) ); init_or_extend = extend; 4000ab40: b4 10 00 19 mov %i1, %i2 for (i = 0; i < _Memory_Get_count( mem ); ++i) { 4000ab44: c2 06 00 00 ld [ %i0 ], %g1 4000ab48: b8 07 20 01 inc %i4 4000ab4c: 80 a7 00 01 cmp %i4, %g1 4000ab50: 0a bf ff ef bcs 4000ab0c <== NEVER TAKEN 4000ab54: b6 06 e0 0c add %i3, 0xc, %i3 } } if ( init_or_extend == _Heap_Initialize ) { 4000ab58: 80 a6 80 11 cmp %i2, %l1 4000ab5c: 02 80 00 04 be 4000ab6c 4000ab60: b0 10 00 10 mov %l0, %i0 _Internal_error( INTERNAL_ERROR_NO_MEMORY_FOR_HEAP ); } return heap; } 4000ab64: 81 c7 e0 08 ret 4000ab68: 81 e8 00 00 restore _Internal_error( INTERNAL_ERROR_NO_MEMORY_FOR_HEAP ); 4000ab6c: 7f ff e7 94 call 400049bc <_Internal_error> 4000ab70: 90 10 20 17 mov 0x17, %o0 4000ab74: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 400018d4 <_Console_simple_Read>: ssize_t _Console_simple_Read( rtems_libio_t *iop, void *buffer, size_t count ) { 400018d4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED ssize_t n; buf = buffer; n = (ssize_t) count; for ( i = 0; i < n; ++i ) { 400018d8: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 400018dc: 04 80 00 0f ble 40001918 <_Console_simple_Read+0x44> <== NOT EXECUTED 400018e0: ba 06 40 1a add %i1, %i2, %i5 <== NOT EXECUTED 400018e4: 30 80 00 03 b,a 400018f0 <_Console_simple_Read+0x1c> <== NOT EXECUTED c = getchark(); if ( c != -1 ) { break; } (void) rtems_task_wake_after( 1 ); 400018e8: 40 00 0b dd call 4000485c <== NOT EXECUTED 400018ec: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED c = getchark(); 400018f0: 40 00 00 0c call 40001920 <== NOT EXECUTED 400018f4: 01 00 00 00 nop <== NOT EXECUTED if ( c != -1 ) { 400018f8: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 400018fc: 02 bf ff fb be 400018e8 <_Console_simple_Read+0x14> <== NOT EXECUTED 40001900: 01 00 00 00 nop <== NOT EXECUTED } buf[ i ] = (char) c; 40001904: d0 2e 40 00 stb %o0, [ %i1 ] <== NOT EXECUTED for ( i = 0; i < n; ++i ) { 40001908: b2 06 60 01 inc %i1 <== NOT EXECUTED 4000190c: 80 a6 40 1d cmp %i1, %i5 <== NOT EXECUTED 40001910: 12 bf ff f8 bne 400018f0 <_Console_simple_Read+0x1c> <== NOT EXECUTED 40001914: 01 00 00 00 nop <== NOT EXECUTED } return n; } 40001918: 81 c7 e0 08 ret <== NOT EXECUTED 4000191c: 91 e8 00 1a restore %g0, %i2, %o0 <== NOT EXECUTED =============================================================================== 40006f84 <_Malloc_Process_deferred_frees>: { 40006f84: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40006f88: 91 d0 20 09 ta 9 <== NOT EXECUTED return _Chain_Immutable_head( the_chain )->next; 40006f8c: 3b 10 00 6b sethi %hi(0x4001ac00), %i5 <== NOT EXECUTED 40006f90: d0 07 61 80 ld [ %i5 + 0x180 ], %o0 ! 4001ad80 <_Malloc_GC_list> <== NOT EXECUTED 40006f94: ba 17 61 80 or %i5, 0x180, %i5 <== NOT EXECUTED if ( !_Chain_Is_empty(the_chain)) 40006f98: b8 07 60 04 add %i5, 4, %i4 <== NOT EXECUTED 40006f9c: 80 a2 00 1c cmp %o0, %i4 <== NOT EXECUTED 40006fa0: 02 80 00 0e be 40006fd8 <_Malloc_Process_deferred_frees+0x54> <== NOT EXECUTED 40006fa4: 01 00 00 00 nop <== NOT EXECUTED new_first = old_first->next; 40006fa8: c4 02 00 00 ld [ %o0 ], %g2 <== NOT EXECUTED head->next = new_first; 40006fac: c4 27 40 00 st %g2, [ %i5 ] <== NOT EXECUTED new_first->previous = head; 40006fb0: fa 20 a0 04 st %i5, [ %g2 + 4 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006fb4: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006fb8: 01 00 00 00 nop <== NOT EXECUTED free( to_be_freed ); 40006fbc: 7f ff ff d1 call 40006f00 <== NOT EXECUTED 40006fc0: 01 00 00 00 nop <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40006fc4: 91 d0 20 09 ta 9 <== NOT EXECUTED return _Chain_Immutable_head( the_chain )->next; 40006fc8: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED if ( !_Chain_Is_empty(the_chain)) 40006fcc: 80 a2 00 1c cmp %o0, %i4 <== NOT EXECUTED 40006fd0: 32 bf ff f7 bne,a 40006fac <_Malloc_Process_deferred_frees+0x28> <== NOT EXECUTED 40006fd4: c4 02 00 00 ld [ %o0 ], %g2 <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006fd8: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006fdc: 01 00 00 00 nop <== NOT EXECUTED } 40006fe0: 81 c7 e0 08 ret <== NOT EXECUTED 40006fe4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 4000dee8 <_exit>: extern void FINI_SYMBOL( void ); #endif void _exit(int status) { 4000dee8: 9d e3 bf a0 save %sp, -96, %sp /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(FINI_SYMBOL) FINI_SYMBOL(); 4000deec: 40 00 04 66 call 4000f084 <_fini> 4000def0: 01 00 00 00 nop #endif rtems_shutdown_executive(status); 4000def4: 7f ff d9 9c call 40004564 4000def8: 90 10 00 18 mov %i0, %o0 4000defc: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 40001988 <_gettimeofday_r>: int _gettimeofday_r( struct _reent *ignored_reentrancy_stuff RTEMS_UNUSED, struct timeval *tp, void *__tz ) { 40001988: 9d e3 bf a0 save %sp, -96, %sp if ( !tp ) 4000198c: 80 a6 60 00 cmp %i1, 0 40001990: 02 80 00 06 be 400019a8 <_gettimeofday_r+0x20> <== NEVER TAKEN 40001994: 90 10 00 19 mov %i1, %o0 40001998: 40 00 0c fb call 40004d84 <_Timecounter_Microtime> 4000199c: b0 10 20 00 clr %i0 struct timezone *tzp = __tz; return gettimeofday( tp, tzp ); } 400019a0: 81 c7 e0 08 ret 400019a4: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( EFAULT ); 400019a8: 40 00 38 95 call 4000fbfc <__errno> <== NOT EXECUTED 400019ac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400019b0: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 400019b4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400019b8: 81 c7 e0 08 ret <== NOT EXECUTED 400019bc: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 400047a8 <_libcsupport_scangr>: FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 400047a8: 9d e3 bf 98 save %sp, -104, %sp int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 400047ac: 98 10 20 00 clr %o4 { 400047b0: f4 27 a0 4c st %i2, [ %fp + 0x4c ] if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 400047b4: 96 07 a0 50 add %fp, 0x50, %o3 { 400047b8: f6 27 a0 50 st %i3, [ %fp + 0x50 ] if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 400047bc: 94 07 a0 4c add %fp, 0x4c, %o2 400047c0: 92 10 00 19 mov %i1, %o1 400047c4: 7f ff ff 20 call 40004444 400047c8: 90 10 00 18 mov %i0, %o0 400047cc: 80 a2 20 00 cmp %o0, 0 400047d0: 12 80 00 04 bne 400047e0 <_libcsupport_scangr+0x38> 400047d4: 98 10 20 00 clr %o4 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; 400047d8: 81 c7 e0 08 ret 400047dc: 91 e8 20 00 restore %g0, 0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 400047e0: 96 07 a0 50 add %fp, 0x50, %o3 400047e4: 94 07 a0 4c add %fp, 0x4c, %o2 400047e8: 92 06 60 04 add %i1, 4, %o1 400047ec: 7f ff ff 16 call 40004444 400047f0: 90 10 00 18 mov %i0, %o0 400047f4: 80 a2 20 00 cmp %o0, 0 400047f8: 02 bf ff f8 be 400047d8 <_libcsupport_scangr+0x30> <== NEVER TAKEN 400047fc: 92 07 bf f8 add %fp, -8, %o1 || !scanInt(fp, &grgid) 40004800: 7f ff fe d8 call 40004360 40004804: 90 10 00 18 mov %i0, %o0 40004808: 80 a2 20 00 cmp %o0, 0 4000480c: 02 bf ff f3 be 400047d8 <_libcsupport_scangr+0x30> <== NEVER TAKEN 40004810: 98 10 20 01 mov 1, %o4 || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 40004814: 96 07 a0 50 add %fp, 0x50, %o3 40004818: 94 07 a0 4c add %fp, 0x4c, %o2 4000481c: 92 07 bf fc add %fp, -4, %o1 40004820: 7f ff ff 09 call 40004444 40004824: 90 10 00 18 mov %i0, %o0 40004828: 80 a2 20 00 cmp %o0, 0 4000482c: 02 bf ff eb be 400047d8 <_libcsupport_scangr+0x30> <== NEVER TAKEN 40004830: c2 07 bf f8 ld [ %fp + -8 ], %g1 grp->gr_gid = grgid; 40004834: c2 36 60 08 sth %g1, [ %i1 + 8 ] /* * Determine number of members */ if (grmem[0] == '\0') { 40004838: fa 07 bf fc ld [ %fp + -4 ], %i5 4000483c: c2 0f 40 00 ldub [ %i5 ], %g1 40004840: 83 28 60 18 sll %g1, 0x18, %g1 40004844: 80 a0 60 00 cmp %g1, 0 40004848: 02 80 00 13 be 40004894 <_libcsupport_scangr+0xec> 4000484c: 86 10 20 13 mov 0x13, %g3 40004850: 84 10 00 1d mov %i5, %g2 memcount = 0; } else { for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40004854: 88 10 20 01 mov 1, %g4 if(*cp == ',') 40004858: 83 38 60 18 sra %g1, 0x18, %g1 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4000485c: 84 00 a0 01 inc %g2 if(*cp == ',') 40004860: 80 a0 60 2c cmp %g1, 0x2c 40004864: 12 80 00 05 bne 40004878 <_libcsupport_scangr+0xd0> 40004868: 86 01 20 01 add %g4, 1, %g3 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 4000486c: 82 01 20 02 add %g4, 2, %g1 memcount++; 40004870: 88 10 00 03 mov %g3, %g4 if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 40004874: 86 10 00 01 mov %g1, %g3 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40004878: c2 08 80 00 ldub [ %g2 ], %g1 4000487c: 83 28 60 18 sll %g1, 0x18, %g1 40004880: 80 a0 60 00 cmp %g1, 0 40004884: 12 bf ff f6 bne 4000485c <_libcsupport_scangr+0xb4> 40004888: 83 38 60 18 sra %g1, 0x18, %g1 if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 4000488c: 87 28 e0 02 sll %g3, 2, %g3 40004890: 86 00 e0 0f add %g3, 0xf, %g3 40004894: c2 07 a0 50 ld [ %fp + 0x50 ], %g1 40004898: 80 a0 40 03 cmp %g1, %g3 4000489c: 0a bf ff cf bcs 400047d8 <_libcsupport_scangr+0x30> <== NEVER TAKEN 400048a0: c6 07 a0 4c ld [ %fp + 0x4c ], %g3 return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 400048a4: 86 00 e0 0f add %g3, 0xf, %g3 400048a8: 86 08 ff f0 and %g3, -16, %g3 400048ac: c6 26 60 0c st %g3, [ %i1 + 0xc ] /* * Fill in pointer array */ if (grmem[0] == '\0') { 400048b0: c2 4f 40 00 ldsb [ %i5 ], %g1 400048b4: 80 a0 60 00 cmp %g1, 0 400048b8: 22 80 00 1c be,a 40004928 <_libcsupport_scangr+0x180> 400048bc: c0 20 c0 00 clr [ %g3 ] memcount = 0; } else { grp->gr_mem[0] = grmem; 400048c0: fa 20 c0 00 st %i5, [ %g3 ] for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 400048c4: ba 10 20 01 mov 1, %i5 400048c8: c4 07 bf fc ld [ %fp + -4 ], %g2 400048cc: c2 08 80 00 ldub [ %g2 ], %g1 400048d0: 83 28 60 18 sll %g1, 0x18, %g1 400048d4: 80 a0 60 00 cmp %g1, 0 400048d8: 02 80 00 13 be 40004924 <_libcsupport_scangr+0x17c> <== NEVER TAKEN 400048dc: 86 00 e0 04 add %g3, 4, %g3 if(*cp == ',') { 400048e0: 83 38 60 18 sra %g1, 0x18, %g1 *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; 400048e4: 89 2f 60 02 sll %i5, 2, %g4 if(*cp == ',') { 400048e8: 80 a0 60 2c cmp %g1, 0x2c 400048ec: 12 80 00 07 bne 40004908 <_libcsupport_scangr+0x160> 400048f0: 84 00 a0 01 inc %g2 *cp = '\0'; 400048f4: c0 28 bf ff clrb [ %g2 + -1 ] grp->gr_mem[memcount++] = cp + 1; 400048f8: ba 07 60 01 inc %i5 400048fc: c2 06 60 0c ld [ %i1 + 0xc ], %g1 40004900: c4 20 40 04 st %g2, [ %g1 + %g4 ] } } } grp->gr_mem[memcount] = NULL; 40004904: 88 01 20 04 add %g4, 4, %g4 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40004908: c2 08 80 00 ldub [ %g2 ], %g1 4000490c: 83 28 60 18 sll %g1, 0x18, %g1 40004910: 80 a0 60 00 cmp %g1, 0 40004914: 32 bf ff f4 bne,a 400048e4 <_libcsupport_scangr+0x13c> 40004918: 83 38 60 18 sra %g1, 0x18, %g1 grp->gr_mem[memcount] = NULL; 4000491c: c6 06 60 0c ld [ %i1 + 0xc ], %g3 40004920: 86 00 c0 04 add %g3, %g4, %g3 40004924: c0 20 c0 00 clr [ %g3 ] return 1; } 40004928: 81 c7 e0 08 ret 4000492c: 91 e8 20 01 restore %g0, 1, %o0 =============================================================================== 4000459c <_libcsupport_scanpw>: FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 4000459c: 9d e3 bf 98 save %sp, -104, %sp int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 400045a0: 98 10 20 00 clr %o4 { 400045a4: f4 27 a0 4c st %i2, [ %fp + 0x4c ] if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 400045a8: 96 07 a0 50 add %fp, 0x50, %o3 { 400045ac: f6 27 a0 50 st %i3, [ %fp + 0x50 ] if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 400045b0: 94 07 a0 4c add %fp, 0x4c, %o2 400045b4: 92 10 00 19 mov %i1, %o1 400045b8: 7f ff ff a3 call 40004444 400045bc: 90 10 00 18 mov %i0, %o0 400045c0: 80 a2 20 00 cmp %o0, 0 400045c4: 12 80 00 04 bne 400045d4 <_libcsupport_scanpw+0x38> 400045c8: 98 10 20 00 clr %o4 || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; 400045cc: 81 c7 e0 08 ret 400045d0: 91 e8 20 00 restore %g0, 0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 400045d4: 96 07 a0 50 add %fp, 0x50, %o3 400045d8: 94 07 a0 4c add %fp, 0x4c, %o2 400045dc: 92 06 60 04 add %i1, 4, %o1 400045e0: 7f ff ff 99 call 40004444 400045e4: 90 10 00 18 mov %i0, %o0 400045e8: 80 a2 20 00 cmp %o0, 0 400045ec: 02 bf ff f8 be 400045cc <_libcsupport_scanpw+0x30> <== NEVER TAKEN 400045f0: 92 07 bf f8 add %fp, -8, %o1 || !scanInt(fp, &pwuid) 400045f4: 7f ff ff 5b call 40004360 400045f8: 90 10 00 18 mov %i0, %o0 400045fc: 80 a2 20 00 cmp %o0, 0 40004600: 02 bf ff f3 be 400045cc <_libcsupport_scanpw+0x30> 40004604: 92 07 bf fc add %fp, -4, %o1 || !scanInt(fp, &pwgid) 40004608: 7f ff ff 56 call 40004360 4000460c: 90 10 00 18 mov %i0, %o0 40004610: 80 a2 20 00 cmp %o0, 0 40004614: 02 bf ff ee be 400045cc <_libcsupport_scanpw+0x30> 40004618: 98 10 20 00 clr %o4 || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 4000461c: 96 07 a0 50 add %fp, 0x50, %o3 40004620: 94 07 a0 4c add %fp, 0x4c, %o2 40004624: 92 06 60 0c add %i1, 0xc, %o1 40004628: 7f ff ff 87 call 40004444 4000462c: 90 10 00 18 mov %i0, %o0 40004630: 80 a2 20 00 cmp %o0, 0 40004634: 02 bf ff e6 be 400045cc <_libcsupport_scanpw+0x30> <== NEVER TAKEN 40004638: 98 10 20 00 clr %o4 || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) 4000463c: 96 07 a0 50 add %fp, 0x50, %o3 40004640: 94 07 a0 4c add %fp, 0x4c, %o2 40004644: 92 06 60 10 add %i1, 0x10, %o1 40004648: 7f ff ff 7f call 40004444 4000464c: 90 10 00 18 mov %i0, %o0 40004650: 80 a2 20 00 cmp %o0, 0 40004654: 02 bf ff de be 400045cc <_libcsupport_scanpw+0x30> <== NEVER TAKEN 40004658: 98 10 20 00 clr %o4 || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) 4000465c: 96 07 a0 50 add %fp, 0x50, %o3 40004660: 94 07 a0 4c add %fp, 0x4c, %o2 40004664: 92 06 60 14 add %i1, 0x14, %o1 40004668: 7f ff ff 77 call 40004444 4000466c: 90 10 00 18 mov %i0, %o0 40004670: 80 a2 20 00 cmp %o0, 0 40004674: 02 bf ff d6 be 400045cc <_libcsupport_scanpw+0x30> <== NEVER TAKEN 40004678: 98 10 20 01 mov 1, %o4 || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) 4000467c: 96 07 a0 50 add %fp, 0x50, %o3 40004680: 94 07 a0 4c add %fp, 0x4c, %o2 40004684: 92 06 60 18 add %i1, 0x18, %o1 40004688: 7f ff ff 6f call 40004444 4000468c: 90 10 00 18 mov %i0, %o0 40004690: 80 a2 20 00 cmp %o0, 0 40004694: 02 bf ff ce be 400045cc <_libcsupport_scanpw+0x30> 40004698: c2 07 bf f8 ld [ %fp + -8 ], %g1 pwd->pw_uid = pwuid; 4000469c: c2 36 60 08 sth %g1, [ %i1 + 8 ] pwd->pw_gid = pwgid; 400046a0: c2 07 bf fc ld [ %fp + -4 ], %g1 400046a4: c2 36 60 0a sth %g1, [ %i1 + 0xa ] return 1; } 400046a8: 81 c7 e0 08 ret 400046ac: 91 e8 20 01 restore %g0, 1, %o0 =============================================================================== 40017234 <_read_r>: struct _reent *ptr RTEMS_UNUSED, int fd, void *buf, size_t nbytes ) { 40017234: 9d e3 bf a0 save %sp, -96, %sp 40017238: 82 10 00 1a mov %i2, %g1 rtems_libio_check_buffer( buffer ); 4001723c: 80 a6 a0 00 cmp %i2, 0 40017240: 02 80 00 13 be 4001728c <_read_r+0x58> <== NEVER TAKEN 40017244: b0 10 00 19 mov %i1, %i0 rtems_libio_check_count( count ); 40017248: 80 a6 e0 00 cmp %i3, 0 4001724c: 02 80 00 08 be 4001726c <_read_r+0x38> <== NEVER TAKEN 40017250: 05 10 00 5d sethi %hi(0x40017400), %g2 LIBIO_GET_IOP_WITH_ACCESS( fd, iop, LIBIO_FLAGS_READ, EBADF ); 40017254: c4 00 a3 d0 ld [ %g2 + 0x3d0 ], %g2 ! 400177d0 40017258: 80 a6 40 02 cmp %i1, %g2 4001725c: 1a 80 00 06 bcc 40017274 <_read_r+0x40> <== NEVER TAKEN 40017260: b4 10 00 1b mov %i3, %i2 40017264: 7f ff ff ca call 4001718c 40017268: 93 e8 00 01 restore %g0, %g1, %o1 return read( fd, buf, nbytes ); } 4001726c: 81 c7 e0 08 ret <== NOT EXECUTED 40017270: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED LIBIO_GET_IOP_WITH_ACCESS( fd, iop, LIBIO_FLAGS_READ, EBADF ); 40017274: 7f ff e2 62 call 4000fbfc <__errno> <== NOT EXECUTED 40017278: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001727c: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40017280: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40017284: 81 c7 e0 08 ret <== NOT EXECUTED 40017288: 81 e8 00 00 restore <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 4001728c: 7f ff e2 5c call 4000fbfc <__errno> <== NOT EXECUTED 40017290: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40017294: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40017298: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001729c: 81 c7 e0 08 ret <== NOT EXECUTED 400172a0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 4000ea68 : #include #include int chroot( const char *path ) { 4000ea68: 9d e3 be e0 save %sp, -288, %sp /* * We use the global environment for path evaluation. This makes it possible * to escape from a chroot environment referencing an unmounted file system. */ rtems_filesystem_eval_path_start_with_root_and_current( 4000ea6c: 40 00 3a 60 call 4001d3ec 4000ea70: 90 10 00 18 mov %i0, %o0 4000ea74: 96 10 20 19 mov 0x19, %o3 4000ea78: 94 10 00 08 mov %o0, %o2 4000ea7c: 92 10 00 18 mov %i0, %o1 4000ea80: 90 07 bf 60 add %fp, -160, %o0 4000ea84: 1b 10 01 13 sethi %hi(0x40044c00), %o5 4000ea88: 9a 13 63 fc or %o5, 0x3fc, %o5 ! 40044ffc 4000ea8c: 40 00 06 29 call 40010330 4000ea90: 98 03 60 04 add %o5, 4, %o4 rtems_filesystem_location_copy_and_detach( 4000ea94: 92 07 bf 78 add %fp, -136, %o1 4000ea98: 40 00 08 d2 call 40010de0 4000ea9c: 90 07 bf 48 add %fp, -184, %o0 &rtems_global_user_env.root_directory, &rtems_global_user_env.current_directory ); rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc ); new_current_loc = rtems_filesystem_location_transform_to_global( &loc ); 4000eaa0: 40 00 08 fb call 40010e8c 4000eaa4: 90 07 bf 48 add %fp, -184, %o0 4000eaa8: d0 27 bf 44 st %o0, [ %fp + -188 ] if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { 4000eaac: 39 10 00 85 sethi %hi(0x40021400), %i4 4000eab0: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 4000eab4: b8 17 23 c8 or %i4, 0x3c8, %i4 4000eab8: 80 a0 40 1c cmp %g1, %i4 4000eabc: 02 80 00 3c be 4000ebac 4000eac0: 01 00 00 00 nop rtems_filesystem_global_location_t *new_root_loc = rtems_filesystem_global_location_obtain( &new_current_loc ); 4000eac4: 40 00 08 52 call 40010c0c 4000eac8: 90 07 bf 44 add %fp, -188, %o0 const rtems_filesystem_location_info_t *loc ) { struct stat st; st.st_mode = 0; 4000eacc: c0 27 bf a8 clr [ %fp + -88 ] 4000ead0: ba 10 00 08 mov %o0, %i5 (void) ( *loc->handlers->fstat_h )( loc, &st ); 4000ead4: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 4000ead8: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 4000eadc: 9f c0 40 00 call %g1 4000eae0: 92 07 bf 98 add %fp, -104, %o1 mode_t type = rtems_filesystem_location_type( &new_root_loc->location ); if ( S_ISDIR( type ) ) { 4000eae4: 05 00 00 3c sethi %hi(0xf000), %g2 4000eae8: c2 07 bf a8 ld [ %fp + -88 ], %g1 4000eaec: 82 08 40 02 and %g1, %g2, %g1 4000eaf0: 05 00 00 10 sethi %hi(0x4000), %g2 4000eaf4: 80 a0 40 02 cmp %g1, %g2 4000eaf8: 32 80 00 14 bne,a 4000eb48 4000eafc: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 sc = rtems_libio_set_private_env(); 4000eb00: 40 00 04 6d call 4000fcb4 4000eb04: 01 00 00 00 nop if (sc == RTEMS_SUCCESSFUL) { 4000eb08: 80 a2 20 00 cmp %o0, 0 4000eb0c: 12 80 00 21 bne 4000eb90 4000eb10: 80 a2 20 0d cmp %o0, 0xd rtems_filesystem_global_location_assign( &rtems_filesystem_root, 4000eb14: 40 00 09 eb call 400112c0 4000eb18: b0 10 20 00 clr %i0 rtems_filesystem_global_location_assign( 4000eb1c: 92 10 00 1d mov %i5, %o1 4000eb20: 40 00 07 d9 call 40010a84 4000eb24: 90 02 20 04 add %o0, 4, %o0 new_root_loc ); rtems_filesystem_global_location_assign( &rtems_filesystem_current, 4000eb28: 40 00 09 e6 call 400112c0 4000eb2c: 01 00 00 00 nop rtems_filesystem_global_location_assign( 4000eb30: 40 00 07 d5 call 40010a84 4000eb34: d2 07 bf 44 ld [ %fp + -188 ], %o1 } } else { rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 4000eb38: 40 00 06 a7 call 400105d4 4000eb3c: 90 07 bf 60 add %fp, -160, %o0 if ( rv != 0 ) { 4000eb40: 81 c7 e0 08 ret 4000eb44: 81 e8 00 00 restore if ( !rtems_filesystem_location_is_null( loc ) ) { 4000eb48: 80 a0 40 1c cmp %g1, %i4 4000eb4c: 22 80 00 07 be,a 4000eb68 <== NEVER TAKEN 4000eb50: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED errno = eno; 4000eb54: 40 00 38 ce call 4001ce8c <__errno> 4000eb58: 01 00 00 00 nop 4000eb5c: 82 10 20 14 mov 0x14, %g1 ! 14 <_TLS_Alignment+0x13> 4000eb60: c2 22 00 00 st %g1, [ %o0 ] rtems_filesystem_global_location_release( new_root_loc, true ); 4000eb64: 90 10 00 1d mov %i5, %o0 4000eb68: 40 00 08 63 call 40010cf4 4000eb6c: 92 10 20 01 mov 1, %o1 rtems_filesystem_eval_path_cleanup( &ctx ); 4000eb70: 40 00 06 99 call 400105d4 4000eb74: 90 07 bf 60 add %fp, -160, %o0 rtems_filesystem_global_location_release( new_current_loc, false ); 4000eb78: d0 07 bf 44 ld [ %fp + -188 ], %o0 4000eb7c: 92 10 20 00 clr %o1 4000eb80: 40 00 08 5d call 40010cf4 4000eb84: b0 10 3f ff mov -1, %i0 } return rv; } 4000eb88: 81 c7 e0 08 ret 4000eb8c: 81 e8 00 00 restore if (sc != RTEMS_UNSATISFIED) { 4000eb90: 22 bf ff f6 be,a 4000eb68 <== NEVER TAKEN 4000eb94: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED errno = ENOMEM; 4000eb98: 40 00 38 bd call 4001ce8c <__errno> 4000eb9c: 01 00 00 00 nop 4000eba0: 82 10 20 0c mov 0xc, %g1 ! c <_TLS_Alignment+0xb> 4000eba4: 10 bf ff f0 b 4000eb64 4000eba8: c2 22 00 00 st %g1, [ %o0 ] rtems_filesystem_eval_path_cleanup( &ctx ); 4000ebac: 40 00 06 8a call 400105d4 4000ebb0: 90 07 bf 60 add %fp, -160, %o0 rtems_filesystem_global_location_release( new_current_loc, false ); 4000ebb4: 10 bf ff f2 b 4000eb7c 4000ebb8: d0 07 bf 44 ld [ %fp + -188 ], %o0 =============================================================================== 40002db4 : void endgrent(void) { 40002db4: 9d e3 bf a0 save %sp, -96, %sp pthread_once(&grp_once, grp_init); 40002db8: 13 10 00 0b sethi %hi(0x40002c00), %o1 40002dbc: 11 10 02 69 sethi %hi(0x4009a400), %o0 40002dc0: 92 12 60 88 or %o1, 0x88, %o1 40002dc4: 40 00 3c f3 call 40012190 40002dc8: 90 12 22 2c or %o0, 0x22c, %o0 return pthread_getspecific(grp_key); 40002dcc: 39 10 02 69 sethi %hi(0x4009a400), %i4 40002dd0: 40 00 3b cd call 40011d04 40002dd4: d0 07 22 28 ld [ %i4 + 0x228 ], %o0 ! 4009a628 grp_context *ctx = grp_get_context(); if (ctx == NULL) 40002dd8: ba 92 20 00 orcc %o0, 0, %i5 40002ddc: 02 80 00 0d be 40002e10 40002de0: 01 00 00 00 nop return; if (ctx->fp != NULL) { 40002de4: d0 07 40 00 ld [ %i5 ], %o0 40002de8: 80 a2 20 00 cmp %o0, 0 40002dec: 02 80 00 04 be 40002dfc <== NEVER TAKEN 40002df0: 01 00 00 00 nop fclose(ctx->fp); 40002df4: 40 01 25 c3 call 4004c500 40002df8: 01 00 00 00 nop } free(ctx); 40002dfc: 7f ff fe 73 call 400027c8 40002e00: 90 10 00 1d mov %i5, %o0 pthread_setspecific(grp_key, NULL); 40002e04: f0 07 22 28 ld [ %i4 + 0x228 ], %i0 40002e08: 40 00 3b d6 call 40011d60 40002e0c: 93 e8 20 00 restore %g0, 0, %o1 } 40002e10: 81 c7 e0 08 ret 40002e14: 81 e8 00 00 restore =============================================================================== 40001ba4 : void endpwent(void) { if (passwd_fp != NULL) 40001ba4: 03 10 00 5d sethi %hi(0x40017400), %g1 40001ba8: d0 00 61 40 ld [ %g1 + 0x140 ], %o0 ! 40017540 40001bac: 80 a2 20 00 cmp %o0, 0 40001bb0: 02 80 00 05 be 40001bc4 <== NEVER TAKEN 40001bb4: 01 00 00 00 nop fclose(passwd_fp); 40001bb8: 82 13 c0 00 mov %o7, %g1 40001bbc: 40 00 39 55 call 40010110 40001bc0: 9e 10 40 00 mov %g1, %o7 } 40001bc4: 81 c3 e0 08 retl <== NOT EXECUTED 40001bc8: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 400022bc : /** * compatible with SVr4, 4.4BSD and X/OPEN - Change Directory */ int fchdir( int fd ) { 400022bc: 9d e3 bf 20 save %sp, -224, %sp int rv = 0; rtems_libio_t *iop; struct stat st; rtems_filesystem_location_info_t loc; st.st_mode = 0; 400022c0: c0 27 bf a8 clr [ %fp + -88 ] st.st_uid = 0; st.st_gid = 0; LIBIO_GET_IOP( fd, iop ); 400022c4: 03 10 00 60 sethi %hi(0x40018000), %g1 st.st_uid = 0; 400022c8: c0 37 bf ae clrh [ %fp + -82 ] LIBIO_GET_IOP( fd, iop ); 400022cc: c2 00 62 c4 ld [ %g1 + 0x2c4 ], %g1 400022d0: 80 a6 00 01 cmp %i0, %g1 400022d4: 1a 80 00 44 bcc 400023e4 400022d8: c0 37 bf b0 clrh [ %fp + -80 ] 400022dc: b9 2e 20 01 sll %i0, 1, %i4 400022e0: 3b 10 00 6e sethi %hi(0x4001b800), %i5 400022e4: b6 07 00 18 add %i4, %i0, %i3 400022e8: ba 17 61 e0 or %i5, 0x1e0, %i5 400022ec: b9 2e e0 04 sll %i3, 4, %i4 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 400022f0: 91 d0 20 09 ta 9 val = *obj; 400022f4: c4 07 40 1c ld [ %i5 + %i4 ], %g2 *obj = val + arg; 400022f8: 86 20 b0 00 sub %g2, -4096, %g3 400022fc: c6 27 40 1c st %g3, [ %i5 + %i4 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40002300: 91 d0 20 0a ta 0xa 40002304: 01 00 00 00 nop 40002308: 80 88 a1 00 btst 0x100, %g2 4000230c: 02 80 00 3c be 400023fc 40002310: b4 07 40 1c add %i5, %i4, %i2 static inline void rtems_filesystem_instance_lock( const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; 40002314: d0 06 a0 24 ld [ %i2 + 0x24 ], %o0 (*mt_entry->ops->lock_h)( mt_entry ); 40002318: c2 02 20 0c ld [ %o0 + 0xc ], %g1 4000231c: c2 00 40 00 ld [ %g1 ], %g1 40002320: 9f c0 40 00 call %g1 40002324: b8 07 20 10 add %i4, 0x10, %i4 rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, &st ); 40002328: c2 06 a0 20 ld [ %i2 + 0x20 ], %g1 4000232c: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40002330: 92 07 bf 98 add %fp, -104, %o1 40002334: b8 07 40 1c add %i5, %i4, %i4 40002338: 9f c0 40 00 call %g1 4000233c: 90 10 00 1c mov %i4, %o0 if ( rv == 0 ) { 40002340: b0 92 20 00 orcc %o0, 0, %i0 40002344: 02 80 00 18 be 400023a4 <== ALWAYS TAKEN 40002348: d6 17 bf b0 lduh [ %fp + -80 ], %o3 static inline void rtems_filesystem_instance_unlock( const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; 4000234c: b7 2e e0 04 sll %i3, 4, %i3 40002350: 82 07 40 1b add %i5, %i3, %g1 40002354: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 (*mt_entry->ops->unlock_h)( mt_entry ); 40002358: c2 02 20 0c ld [ %o0 + 0xc ], %g1 4000235c: c2 00 60 04 ld [ %g1 + 4 ], %g1 40002360: 9f c0 40 00 call %g1 40002364: 01 00 00 00 nop __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40002368: 91 d0 20 09 ta 9 *obj = val - arg; 4000236c: c4 07 40 1b ld [ %i5 + %i3 ], %g2 40002370: 84 00 b0 00 add %g2, -4096, %g2 40002374: c4 27 40 1b st %g2, [ %i5 + %i3 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40002378: 91 d0 20 0a ta 0xa 4000237c: 01 00 00 00 nop } } rtems_filesystem_instance_unlock( &iop->pathinfo ); rtems_libio_iop_drop( iop ); if ( rv == 0 ) { 40002380: 80 a6 20 00 cmp %i0, 0 40002384: 02 80 00 04 be 40002394 40002388: 01 00 00 00 nop rv = rtems_filesystem_chdir( &loc ); } return rv; } 4000238c: 81 c7 e0 08 ret 40002390: 81 e8 00 00 restore rv = rtems_filesystem_chdir( &loc ); 40002394: 40 00 25 a3 call 4000ba20 40002398: 90 07 bf 80 add %fp, -128, %o0 } 4000239c: 81 c7 e0 08 ret 400023a0: 91 e8 00 08 restore %g0, %o0, %o0 bool access_ok = rtems_filesystem_check_access( 400023a4: d4 17 bf ae lduh [ %fp + -82 ], %o2 400023a8: d2 07 bf a8 ld [ %fp + -88 ], %o1 400023ac: 40 00 07 89 call 400041d0 400023b0: 90 10 20 01 mov 1, %o0 if ( access_ok ) { 400023b4: 80 a2 20 00 cmp %o0, 0 400023b8: 02 80 00 06 be 400023d0 400023bc: 92 10 00 1c mov %i4, %o1 rtems_filesystem_location_clone( &loc, &iop->pathinfo ); 400023c0: 40 00 25 bd call 4000bab4 400023c4: 90 07 bf 80 add %fp, -128, %o0 400023c8: 10 bf ff e2 b 40002350 400023cc: b7 2e e0 04 sll %i3, 4, %i3 errno = EACCES; 400023d0: 40 00 3c 88 call 400115f0 <__errno> 400023d4: b0 10 3f ff mov -1, %i0 400023d8: 82 10 20 0d mov 0xd, %g1 400023dc: 10 bf ff dc b 4000234c 400023e0: c2 22 00 00 st %g1, [ %o0 ] LIBIO_GET_IOP( fd, iop ); 400023e4: 40 00 3c 83 call 400115f0 <__errno> 400023e8: b0 10 3f ff mov -1, %i0 400023ec: 82 10 20 09 mov 9, %g1 400023f0: c2 22 00 00 st %g1, [ %o0 ] 400023f4: 81 c7 e0 08 ret 400023f8: 81 e8 00 00 restore __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 400023fc: 91 d0 20 09 ta 9 40002400: c4 07 40 1c ld [ %i5 + %i4 ], %g2 40002404: 84 00 b0 00 add %g2, -4096, %g2 40002408: c4 27 40 1c st %g2, [ %i5 + %i4 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000240c: 91 d0 20 0a ta 0xa 40002410: 01 00 00 00 nop 40002414: 40 00 3c 77 call 400115f0 <__errno> 40002418: b0 10 3f ff mov -1, %i0 ! ffffffff 4000241c: 82 10 20 09 mov 9, %g1 40002420: c2 22 00 00 st %g1, [ %o0 ] 40002424: 81 c7 e0 08 ret 40002428: 81 e8 00 00 restore =============================================================================== 400028d4 : int fcntl( int fd, int cmd, ... ) { 400028d4: 9d e3 bf 90 save %sp, -112, %sp int ret; va_list ap; va_start( ap, cmd ); 400028d8: 86 07 a0 4c add %fp, 0x4c, %g3 400028dc: f4 27 a0 4c st %i2, [ %fp + 0x4c ] LIBIO_GET_IOP( fd, iop ); 400028e0: 09 10 00 60 sethi %hi(0x40018000), %g4 va_start( ap, cmd ); 400028e4: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 400028e8: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 400028ec: fa 27 a0 58 st %i5, [ %fp + 0x58 ] LIBIO_GET_IOP( fd, iop ); 400028f0: c2 01 22 c4 ld [ %g4 + 0x2c4 ], %g1 400028f4: 80 a6 00 01 cmp %i0, %g1 400028f8: 1a 80 00 e8 bcc 40002c98 400028fc: c6 27 bf fc st %g3, [ %fp + -4 ] return &rtems_libio_iops[ fd ]; 40002900: b9 2e 20 01 sll %i0, 1, %i4 40002904: 3b 10 00 6e sethi %hi(0x4001b800), %i5 40002908: b8 07 00 18 add %i4, %i0, %i4 4000290c: ba 17 61 e0 or %i5, 0x1e0, %i5 40002910: b7 2f 20 04 sll %i4, 4, %i3 40002914: a0 07 40 1b add %i5, %i3, %l0 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40002918: 91 d0 20 09 ta 9 val = *obj; 4000291c: c4 07 40 1b ld [ %i5 + %i3 ], %g2 *obj = val + arg; 40002920: b4 20 b0 00 sub %g2, -4096, %i2 40002924: f4 27 40 1b st %i2, [ %i5 + %i3 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40002928: 91 d0 20 0a ta 0xa 4000292c: 01 00 00 00 nop 40002930: 80 88 a1 00 btst 0x100, %g2 40002934: 02 80 00 df be 40002cb0 40002938: 80 a6 60 14 cmp %i1, 0x14 switch ( cmd ) { 4000293c: 18 80 00 14 bgu 4000298c <== NEVER TAKEN 40002940: 83 2e 60 02 sll %i1, 2, %g1 40002944: 05 10 00 0a sethi %hi(0x40002800), %g2 40002948: 84 10 a0 80 or %g2, 0x80, %g2 ! 40002880 4000294c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40002950: 81 c0 40 00 jmp %g1 40002954: 01 00 00 00 nop errno = ENOTSUP; 40002958: 40 00 3b 26 call 400115f0 <__errno> 4000295c: b0 10 3f ff mov -1, %i0 ! ffffffff 40002960: 82 10 20 86 mov 0x86, %g1 40002964: c2 22 00 00 st %g1, [ %o0 ] __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40002968: 91 d0 20 09 ta 9 *obj = val - arg; 4000296c: b9 2f 20 04 sll %i4, 4, %i4 40002970: c4 07 40 1c ld [ %i5 + %i4 ], %g2 40002974: 84 00 b0 00 add %g2, -4096, %g2 40002978: c4 27 40 1c st %g2, [ %i5 + %i4 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000297c: 91 d0 20 0a ta 0xa 40002980: 01 00 00 00 nop ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 40002984: 81 c7 e0 08 ret 40002988: 81 e8 00 00 restore errno = EINVAL; 4000298c: 40 00 3b 19 call 400115f0 <__errno> 40002990: b0 10 3f ff mov -1, %i0 40002994: 82 10 20 16 mov 0x16, %g1 40002998: 10 bf ff f4 b 40002968 4000299c: c2 22 00 00 st %g1, [ %o0 ] val = *obj; 400029a0: d0 07 40 1b ld [ %i5 + %i3 ], %o0 oflag = rtems_libio_to_fcntl_flags( rtems_libio_iop_flags( iop ) ); 400029a4: 40 00 02 02 call 400031ac 400029a8: 01 00 00 00 nop diop = rtems_libio_allocate(); 400029ac: 40 00 02 13 call 400031f8 400029b0: a2 10 00 08 mov %o0, %l1 if (diop != NULL) { 400029b4: b4 92 20 00 orcc %o0, 0, %i2 400029b8: 02 bf ff ec be 40002968 <== NEVER TAKEN 400029bc: b0 10 3f ff mov -1, %i0 const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; 400029c0: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 (*mt_entry->ops->lock_h)( mt_entry ); 400029c4: c2 02 20 0c ld [ %o0 + 0xc ], %g1 400029c8: c2 00 40 00 ld [ %g1 ], %g1 400029cc: 9f c0 40 00 call %g1 400029d0: 01 00 00 00 nop rtems_filesystem_location_clone( &diop->pathinfo, &iop->pathinfo ); 400029d4: 90 06 a0 10 add %i2, 0x10, %o0 400029d8: 92 06 e0 10 add %i3, 0x10, %o1 400029dc: 40 00 24 36 call 4000bab4 400029e0: 92 07 40 09 add %i5, %o1, %o1 const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; 400029e4: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 (*mt_entry->ops->unlock_h)( mt_entry ); 400029e8: c2 02 20 0c ld [ %o0 + 0xc ], %g1 400029ec: c2 00 60 04 ld [ %g1 + 4 ], %g1 400029f0: 9f c0 40 00 call %g1 400029f4: 01 00 00 00 nop rv = (*diop->pathinfo.handlers->open_h)( diop, NULL, oflag, 0 ); 400029f8: c2 06 a0 20 ld [ %i2 + 0x20 ], %g1 400029fc: c2 00 40 00 ld [ %g1 ], %g1 40002a00: 96 10 20 00 clr %o3 40002a04: 94 10 00 11 mov %l1, %o2 40002a08: 92 10 20 00 clr %o1 40002a0c: 9f c0 40 00 call %g1 40002a10: 90 10 00 1a mov %i2, %o0 if ( rv == 0 ) { 40002a14: b0 92 20 00 orcc %o0, 0, %i0 40002a18: 12 80 00 9c bne 40002c88 <== NEVER TAKEN 40002a1c: 01 00 00 00 nop LIBIO_FLAGS_OPEN | rtems_libio_fcntl_flags( oflag ) 40002a20: 40 00 01 d6 call 40003178 40002a24: 90 10 00 11 mov %l1, %o0 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40002a28: 91 d0 20 09 ta 9 *obj = val | arg; 40002a2c: c4 06 80 00 ld [ %i2 ], %g2 40002a30: 84 12 00 02 or %o0, %g2, %g2 40002a34: 84 10 a1 00 or %g2, 0x100, %g2 40002a38: c4 26 80 00 st %g2, [ %i2 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40002a3c: 91 d0 20 0a ta 0xa 40002a40: 01 00 00 00 nop rv = rtems_libio_iop_to_descriptor( diop ); 40002a44: b0 26 80 1d sub %i2, %i5, %i0 40002a48: 91 3e 20 04 sra %i0, 4, %o0 40002a4c: 31 2a aa aa sethi %hi(0xaaaaa800), %i0 40002a50: b0 16 22 ab or %i0, 0x2ab, %i0 ! aaaaaaab 40002a54: 10 80 00 2b b 40002b00 40002a58: b0 5a 00 18 smul %o0, %i0, %i0 val = *obj; 40002a5c: f0 07 40 1b ld [ %i5 + %i3 ], %i0 ret = ((rtems_libio_iop_flags(iop) & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 40002a60: b1 36 20 0b srl %i0, 0xb, %i0 40002a64: b0 0e 20 01 and %i0, 1, %i0 int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd ); 40002a68: 83 2f 20 04 sll %i4, 4, %g1 40002a6c: 82 07 40 01 add %i5, %g1, %g1 40002a70: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 40002a74: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 40002a78: 92 10 00 19 mov %i1, %o1 40002a7c: 9f c0 40 00 call %g1 40002a80: 90 10 00 10 mov %l0, %o0 if (err) { 40002a84: b6 92 20 00 orcc %o0, 0, %i3 40002a88: 02 bf ff b8 be 40002968 <== ALWAYS TAKEN 40002a8c: 01 00 00 00 nop errno = err; 40002a90: 40 00 3a d8 call 400115f0 <__errno> <== NOT EXECUTED 40002a94: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40002a98: f6 22 00 00 st %i3, [ %o0 ] <== NOT EXECUTED __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40002a9c: 91 d0 20 09 ta 9 <== NOT EXECUTED *obj = val - arg; 40002aa0: b9 2f 20 04 sll %i4, 4, %i4 <== NOT EXECUTED 40002aa4: c4 07 40 1c ld [ %i5 + %i4 ], %g2 <== NOT EXECUTED 40002aa8: 84 00 b0 00 add %g2, -4096, %g2 <== NOT EXECUTED 40002aac: c4 27 40 1c st %g2, [ %i5 + %i4 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40002ab0: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40002ab4: 01 00 00 00 nop <== NOT EXECUTED } 40002ab8: 81 c7 e0 08 ret <== NOT EXECUTED 40002abc: 81 e8 00 00 restore <== NOT EXECUTED if ( va_arg( ap, int ) ) 40002ac0: f0 00 c0 00 ld [ %g3 ], %i0 40002ac4: 80 a6 20 00 cmp %i0, 0 40002ac8: 02 80 00 68 be 40002c68 40002acc: 01 00 00 00 nop __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40002ad0: 91 d0 20 09 ta 9 *obj = val | arg; 40002ad4: c4 07 40 1b ld [ %i5 + %i3 ], %g2 40002ad8: 84 10 a8 00 or %g2, 0x800, %g2 40002adc: c4 27 40 1b st %g2, [ %i5 + %i3 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40002ae0: 91 d0 20 0a ta 0xa 40002ae4: 01 00 00 00 nop return _Atomic_Fetch_or_uint( &iop->flags, set, ATOMIC_ORDER_RELAXED ); 40002ae8: 10 bf ff e0 b 40002a68 40002aec: b0 10 20 00 clr %i0 ! 0 val = *obj; 40002af0: d0 07 40 1b ld [ %i5 + %i3 ], %o0 ret = rtems_libio_to_fcntl_flags( rtems_libio_iop_flags( iop ) ); 40002af4: 40 00 01 ae call 400031ac 40002af8: 01 00 00 00 nop 40002afc: b0 10 00 08 mov %o0, %i0 if (ret >= 0) { 40002b00: 80 a6 20 00 cmp %i0, 0 40002b04: 16 bf ff da bge 40002a6c <== ALWAYS TAKEN 40002b08: 83 2f 20 04 sll %i4, 4, %g1 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40002b0c: 91 d0 20 09 ta 9 <== NOT EXECUTED *obj = val - arg; 40002b10: b9 2f 20 04 sll %i4, 4, %i4 <== NOT EXECUTED 40002b14: c4 07 40 1c ld [ %i5 + %i4 ], %g2 <== NOT EXECUTED 40002b18: 84 00 b0 00 add %g2, -4096, %g2 <== NOT EXECUTED 40002b1c: c4 27 40 1c st %g2, [ %i5 + %i4 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40002b20: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40002b24: 01 00 00 00 nop <== NOT EXECUTED } 40002b28: 81 c7 e0 08 ret <== NOT EXECUTED 40002b2c: 81 e8 00 00 restore <== NOT EXECUTED fd2 = va_arg( ap, int ); 40002b30: e4 00 c0 00 ld [ %g3 ], %l2 if ( (uint32_t) fd2 >= rtems_libio_number_iops ) { 40002b34: c2 01 22 c4 ld [ %g4 + 0x2c4 ], %g1 40002b38: 80 a4 80 01 cmp %l2, %g1 40002b3c: 1a 80 00 69 bcc 40002ce0 <== NEVER TAKEN 40002b40: 01 00 00 00 nop return &rtems_libio_iops[ fd ]; 40002b44: b5 2c a0 01 sll %l2, 1, %i2 40002b48: b4 06 80 12 add %i2, %l2, %i2 40002b4c: a3 2e a0 04 sll %i2, 4, %l1 40002b50: a6 07 40 11 add %i5, %l1, %l3 if (iop != iop2) 40002b54: 80 a4 00 13 cmp %l0, %l3 40002b58: 02 bf ff c4 be 40002a68 <== NEVER TAKEN 40002b5c: b0 10 20 00 clr %i0 val = *obj; 40002b60: c2 07 40 11 ld [ %i5 + %l1 ], %g1 if ((rtems_libio_iop_flags( iop2 ) & LIBIO_FLAGS_OPEN) != 0) { 40002b64: 80 88 61 00 btst 0x100, %g1 40002b68: 22 80 00 0a be,a 40002b90 <== NEVER TAKEN 40002b6c: d0 07 40 1b ld [ %i5 + %i3 ], %o0 <== NOT EXECUTED rv = (*iop2->pathinfo.handlers->close_h)( iop2 ); 40002b70: c2 04 e0 20 ld [ %l3 + 0x20 ], %g1 40002b74: c2 00 60 04 ld [ %g1 + 4 ], %g1 40002b78: 9f c0 40 00 call %g1 40002b7c: 90 10 00 13 mov %l3, %o0 if (rv == 0) { 40002b80: b0 92 20 00 orcc %o0, 0, %i0 40002b84: 12 bf ff e0 bne 40002b04 <== NEVER TAKEN 40002b88: 80 a6 20 00 cmp %i0, 0 40002b8c: d0 07 40 1b ld [ %i5 + %i3 ], %o0 oflag = rtems_libio_to_fcntl_flags( rtems_libio_iop_flags( iop ) ); 40002b90: 40 00 01 87 call 400031ac 40002b94: 01 00 00 00 nop rtems_libio_iop_flags_set( iop2, rtems_libio_fcntl_flags( oflag ) ); 40002b98: 40 00 01 78 call 40003178 40002b9c: d0 27 bf f4 st %o0, [ %fp + -12 ] __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40002ba0: 91 d0 20 09 ta 9 *obj = val | arg; 40002ba4: c6 07 40 11 ld [ %i5 + %l1 ], %g3 40002ba8: 84 10 c0 08 or %g3, %o0, %g2 40002bac: c4 27 40 11 st %g2, [ %i5 + %l1 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40002bb0: 91 d0 20 0a ta 0xa 40002bb4: 01 00 00 00 nop const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; 40002bb8: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 (*mt_entry->ops->lock_h)( mt_entry ); 40002bbc: c2 02 20 0c ld [ %o0 + 0xc ], %g1 40002bc0: c2 00 40 00 ld [ %g1 ], %g1 40002bc4: 9f c0 40 00 call %g1 40002bc8: b5 2e a0 04 sll %i2, 4, %i2 rtems_filesystem_location_clone( &iop2->pathinfo, &iop->pathinfo ); 40002bcc: 92 06 e0 10 add %i3, 0x10, %o1 40002bd0: 90 04 60 10 add %l1, 0x10, %o0 40002bd4: 92 07 40 09 add %i5, %o1, %o1 40002bd8: 40 00 23 b7 call 4000bab4 40002bdc: 90 07 40 08 add %i5, %o0, %o0 const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; 40002be0: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 (*mt_entry->ops->unlock_h)( mt_entry ); 40002be4: c2 02 20 0c ld [ %o0 + 0xc ], %g1 40002be8: c2 00 60 04 ld [ %g1 + 4 ], %g1 40002bec: 9f c0 40 00 call %g1 40002bf0: b4 07 40 1a add %i5, %i2, %i2 rv = (*iop2->pathinfo.handlers->open_h)( iop2, NULL, oflag, 0 ); 40002bf4: c2 06 a0 20 ld [ %i2 + 0x20 ], %g1 40002bf8: c2 00 40 00 ld [ %g1 ], %g1 40002bfc: d4 07 bf f4 ld [ %fp + -12 ], %o2 40002c00: 96 10 20 00 clr %o3 40002c04: 92 10 20 00 clr %o1 40002c08: 9f c0 40 00 call %g1 40002c0c: 90 10 00 13 mov %l3, %o0 if ( rv == 0 ) { 40002c10: b0 92 20 00 orcc %o0, 0, %i0 40002c14: 22 bf ff bb be,a 40002b00 <== ALWAYS TAKEN 40002c18: b0 10 00 12 mov %l2, %i0 if (ret >= 0) { 40002c1c: 10 bf ff ba b 40002b04 <== NOT EXECUTED 40002c20: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 40002c24: 40 00 01 55 call 40003178 40002c28: d0 00 c0 00 ld [ %g3 ], %o0 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40002c2c: 91 d0 20 09 ta 9 *obj = val & arg; 40002c30: c4 07 40 1b ld [ %i5 + %i3 ], %g2 40002c34: 84 08 bd fe and %g2, -514, %g2 40002c38: c4 27 40 1b st %g2, [ %i5 + %i3 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40002c3c: 91 d0 20 0a ta 0xa 40002c40: 01 00 00 00 nop __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40002c44: 91 d0 20 09 ta 9 *obj = val | arg; 40002c48: c4 07 40 1b ld [ %i5 + %i3 ], %g2 rtems_libio_iop_flags_set( iop, flags & mask ); 40002c4c: 90 0a 22 01 and %o0, 0x201, %o0 40002c50: 90 10 80 08 or %g2, %o0, %o0 40002c54: d0 27 40 1b st %o0, [ %i5 + %i3 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40002c58: 91 d0 20 0a ta 0xa 40002c5c: 01 00 00 00 nop return _Atomic_Fetch_or_uint( &iop->flags, set, ATOMIC_ORDER_RELAXED ); 40002c60: 10 bf ff 82 b 40002a68 40002c64: b0 10 20 00 clr %i0 ! 0 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40002c68: 91 d0 20 09 ta 9 *obj = val & arg; 40002c6c: c4 07 40 1b ld [ %i5 + %i3 ], %g2 40002c70: 84 08 b7 ff and %g2, -2049, %g2 40002c74: c4 27 40 1b st %g2, [ %i5 + %i3 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40002c78: 91 d0 20 0a ta 0xa 40002c7c: 01 00 00 00 nop return _Atomic_Fetch_and_uint( &iop->flags, ~clear, ATOMIC_ORDER_RELAXED ); 40002c80: 10 bf ff 7b b 40002a6c 40002c84: 83 2f 20 04 sll %i4, 4, %g1 rtems_libio_free( diop ); 40002c88: 40 00 01 71 call 4000324c <== NOT EXECUTED 40002c8c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED if (ret >= 0) { 40002c90: 10 bf ff 9d b 40002b04 <== NOT EXECUTED 40002c94: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED LIBIO_GET_IOP( fd, iop ); 40002c98: 40 00 3a 56 call 400115f0 <__errno> 40002c9c: b0 10 3f ff mov -1, %i0 40002ca0: 82 10 20 09 mov 9, %g1 40002ca4: c2 22 00 00 st %g1, [ %o0 ] 40002ca8: 81 c7 e0 08 ret 40002cac: 81 e8 00 00 restore __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40002cb0: 91 d0 20 09 ta 9 *obj = val - arg; 40002cb4: c4 07 40 1b ld [ %i5 + %i3 ], %g2 40002cb8: 84 00 b0 00 add %g2, -4096, %g2 40002cbc: c4 27 40 1b st %g2, [ %i5 + %i3 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40002cc0: 91 d0 20 0a ta 0xa 40002cc4: 01 00 00 00 nop 40002cc8: 40 00 3a 4a call 400115f0 <__errno> 40002ccc: b0 10 3f ff mov -1, %i0 ! ffffffff 40002cd0: 82 10 20 09 mov 9, %g1 40002cd4: c2 22 00 00 st %g1, [ %o0 ] 40002cd8: 81 c7 e0 08 ret 40002cdc: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( EBADF ); 40002ce0: 40 00 3a 44 call 400115f0 <__errno> <== NOT EXECUTED 40002ce4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002ce8: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40002cec: 10 bf ff 1f b 40002968 <== NOT EXECUTED 40002cf0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED =============================================================================== 40006e8c : */ long fpathconf( int fd, int name ) { 40006e8c: 9d e3 bf a0 save %sp, -96, %sp long return_value; rtems_libio_t *iop; const rtems_filesystem_limits_and_options_t *the_limits; LIBIO_GET_IOP( fd, iop ); 40006e90: 03 10 00 39 sethi %hi(0x4000e400), %g1 40006e94: c2 00 60 a4 ld [ %g1 + 0xa4 ], %g1 ! 4000e4a4 40006e98: 80 a6 00 01 cmp %i0, %g1 40006e9c: 1a 80 00 44 bcc 40006fac 40006ea0: b9 2e 20 01 sll %i0, 1, %i4 40006ea4: 3b 10 00 45 sethi %hi(0x40011400), %i5 40006ea8: b8 07 00 18 add %i4, %i0, %i4 40006eac: ba 17 61 a0 or %i5, 0x1a0, %i5 40006eb0: 85 2f 20 04 sll %i4, 4, %g2 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40006eb4: 91 d0 20 09 ta 9 val = *obj; 40006eb8: c6 07 40 02 ld [ %i5 + %g2 ], %g3 *obj = val + arg; 40006ebc: 88 20 f0 00 sub %g3, -4096, %g4 40006ec0: c8 27 40 02 st %g4, [ %i5 + %g2 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006ec4: 91 d0 20 0a ta 0xa 40006ec8: 01 00 00 00 nop 40006ecc: 80 88 e1 00 btst 0x100, %g3 40006ed0: 02 80 00 31 be 40006f94 <== NEVER TAKEN 40006ed4: 80 a6 60 0b cmp %i1, 0xb /* * Now process the information request. */ the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options; 40006ed8: 84 07 40 02 add %i5, %g2, %g2 40006edc: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 40006ee0: 18 80 00 28 bgu 40006f80 40006ee4: c4 00 60 2c ld [ %g1 + 0x2c ], %g2 40006ee8: b3 2e 60 02 sll %i1, 2, %i1 40006eec: 03 10 00 1b sethi %hi(0x40006c00), %g1 40006ef0: 82 10 62 5c or %g1, 0x25c, %g1 ! 40006e5c 40006ef4: c2 00 40 19 ld [ %g1 + %i1 ], %g1 40006ef8: 81 c0 40 00 jmp %g1 40006efc: 01 00 00 00 nop break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 40006f00: f0 00 a0 24 ld [ %g2 + 0x24 ], %i0 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40006f04: 91 d0 20 09 ta 9 *obj = val - arg; 40006f08: b9 2f 20 04 sll %i4, 4, %i4 40006f0c: c4 07 40 1c ld [ %i5 + %i4 ], %g2 40006f10: 84 00 b0 00 add %g2, -4096, %g2 40006f14: c4 27 40 1c st %g2, [ %i5 + %i4 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006f18: 91 d0 20 0a ta 0xa 40006f1c: 01 00 00 00 nop break; } rtems_libio_iop_drop( iop ); return return_value; } 40006f20: 81 c7 e0 08 ret 40006f24: 81 e8 00 00 restore break; 40006f28: 10 bf ff f7 b 40006f04 40006f2c: f0 00 a0 28 ld [ %g2 + 0x28 ], %i0 break; 40006f30: 10 bf ff f5 b 40006f04 40006f34: f0 00 80 00 ld [ %g2 ], %i0 break; 40006f38: 10 bf ff f3 b 40006f04 40006f3c: f0 00 a0 04 ld [ %g2 + 4 ], %i0 break; 40006f40: 10 bf ff f1 b 40006f04 40006f44: f0 00 a0 08 ld [ %g2 + 8 ], %i0 break; 40006f48: 10 bf ff ef b 40006f04 40006f4c: f0 00 a0 0c ld [ %g2 + 0xc ], %i0 break; 40006f50: 10 bf ff ed b 40006f04 40006f54: f0 00 a0 10 ld [ %g2 + 0x10 ], %i0 break; 40006f58: 10 bf ff eb b 40006f04 40006f5c: f0 00 a0 14 ld [ %g2 + 0x14 ], %i0 break; 40006f60: 10 bf ff e9 b 40006f04 40006f64: f0 00 a0 1c ld [ %g2 + 0x1c ], %i0 break; 40006f68: 10 bf ff e7 b 40006f04 40006f6c: f0 00 a0 20 ld [ %g2 + 0x20 ], %i0 break; 40006f70: 10 bf ff e5 b 40006f04 40006f74: f0 00 a0 2c ld [ %g2 + 0x2c ], %i0 break; 40006f78: 10 bf ff e3 b 40006f04 40006f7c: f0 00 a0 18 ld [ %g2 + 0x18 ], %i0 errno = EINVAL; 40006f80: 40 00 19 c5 call 4000d694 <__errno> 40006f84: b0 10 3f ff mov -1, %i0 40006f88: 82 10 20 16 mov 0x16, %g1 break; 40006f8c: 10 bf ff de b 40006f04 40006f90: c2 22 00 00 st %g1, [ %o0 ] __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40006f94: 91 d0 20 09 ta 9 <== NOT EXECUTED 40006f98: c6 07 40 02 ld [ %i5 + %g2 ], %g3 <== NOT EXECUTED 40006f9c: 86 00 f0 00 add %g3, -4096, %g3 <== NOT EXECUTED 40006fa0: c6 27 40 02 st %g3, [ %i5 + %g2 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006fa4: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40006fa8: 01 00 00 00 nop <== NOT EXECUTED LIBIO_GET_IOP( fd, iop ); 40006fac: 40 00 19 ba call 4000d694 <__errno> 40006fb0: b0 10 3f ff mov -1, %i0 ! ffffffff 40006fb4: 82 10 20 09 mov 9, %g1 40006fb8: c2 22 00 00 st %g1, [ %o0 ] 40006fbc: 81 c7 e0 08 ret 40006fc0: 81 e8 00 00 restore =============================================================================== 40006f00 : } void free( void *ptr ) { 40006f00: 9d e3 bf a0 save %sp, -96, %sp if ( !ptr ) 40006f04: 80 a6 20 00 cmp %i0, 0 40006f08: 02 80 00 1a be 40006f70 40006f0c: 01 00 00 00 nop return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _Malloc_System_state() != MALLOC_SYSTEM_STATE_NORMAL ) { 40006f10: 40 00 00 8f call 4000714c <_Malloc_System_state> 40006f14: 01 00 00 00 nop 40006f18: 80 a2 20 00 cmp %o0, 0 40006f1c: 12 80 00 0a bne 40006f44 40006f20: 03 10 00 72 sethi %hi(0x4001c800), %g1 _Malloc_Deferred_free(ptr); return; } if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 40006f24: d0 00 60 28 ld [ %g1 + 0x28 ], %o0 ! 4001c828 40006f28: 40 00 06 35 call 400087fc <_Protected_heap_Free> 40006f2c: 92 10 00 18 mov %i0, %o1 40006f30: 80 a2 20 00 cmp %o0, 0 40006f34: 02 80 00 11 be 40006f78 40006f38: 92 10 00 18 mov %i0, %o1 rtems_fatal( RTEMS_FATAL_SOURCE_INVALID_HEAP_FREE, (rtems_fatal_code) ptr ); } } 40006f3c: 81 c7 e0 08 ret 40006f40: 81 e8 00 00 restore __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40006f44: 91 d0 20 09 ta 9 old_last = tail->previous; 40006f48: 05 10 00 6b sethi %hi(0x4001ac00), %g2 40006f4c: 84 10 a1 80 or %g2, 0x180, %g2 ! 4001ad80 <_Malloc_GC_list> 40006f50: c6 00 a0 08 ld [ %g2 + 8 ], %g3 the_node->next = tail; 40006f54: 88 00 a0 04 add %g2, 4, %g4 40006f58: c8 26 00 00 st %g4, [ %i0 ] tail->previous = the_node; 40006f5c: f0 20 a0 08 st %i0, [ %g2 + 8 ] old_last->next = the_node; 40006f60: f0 20 c0 00 st %i0, [ %g3 ] the_node->previous = old_last; 40006f64: c6 26 20 04 st %g3, [ %i0 + 4 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40006f68: 91 d0 20 0a ta 0xa 40006f6c: 01 00 00 00 nop } 40006f70: 81 c7 e0 08 ret 40006f74: 81 e8 00 00 restore RTEMS_NO_RETURN RTEMS_INLINE_ROUTINE void rtems_fatal( rtems_fatal_source fatal_source, rtems_fatal_code error_code ) { _Terminate( fatal_source, error_code ); 40006f78: 7f ff f6 7e call 40004970 <_Terminate> 40006f7c: 90 10 20 0c mov 0xc, %o0 40006f80: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 40016f90 : int fstat( int fd, struct stat *sbuf ) { 40016f90: 9d e3 bf a0 save %sp, -96, %sp int rv; /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 40016f94: 80 a6 60 00 cmp %i1, 0 40016f98: 02 80 00 32 be 40017060 <== NEVER TAKEN 40016f9c: 03 10 00 5d sethi %hi(0x40017400), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Now process the stat() request. */ LIBIO_GET_IOP( fd, iop ); 40016fa0: c2 00 63 d0 ld [ %g1 + 0x3d0 ], %g1 ! 400177d0 40016fa4: 80 a6 00 01 cmp %i0, %g1 40016fa8: 1a 80 00 28 bcc 40017048 40016fac: bb 2e 20 01 sll %i0, 1, %i5 40016fb0: 39 10 00 6c sethi %hi(0x4001b000), %i4 40016fb4: ba 07 40 18 add %i5, %i0, %i5 40016fb8: b8 17 21 20 or %i4, 0x120, %i4 40016fbc: bb 2f 60 04 sll %i5, 4, %i5 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40016fc0: 91 d0 20 09 ta 9 val = *obj; 40016fc4: c4 07 40 1c ld [ %i5 + %i4 ], %g2 *obj = val + arg; 40016fc8: 86 20 b0 00 sub %g2, -4096, %g3 40016fcc: c6 27 40 1c st %g3, [ %i5 + %i4 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40016fd0: 91 d0 20 0a ta 0xa 40016fd4: 01 00 00 00 nop 40016fd8: 80 88 a1 00 btst 0x100, %g2 40016fdc: 02 80 00 15 be 40017030 40016fe0: 94 10 20 68 mov 0x68, %o2 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 40016fe4: 92 10 20 00 clr %o1 40016fe8: 7f ff e4 1a call 40010050 40016fec: 90 10 00 19 mov %i1, %o0 rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); 40016ff0: 82 07 00 1d add %i4, %i5, %g1 40016ff4: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 40016ff8: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40016ffc: 90 07 60 10 add %i5, 0x10, %o0 40017000: 92 10 00 19 mov %i1, %o1 40017004: 9f c0 40 00 call %g1 40017008: 90 07 00 08 add %i4, %o0, %o0 4001700c: b0 10 00 08 mov %o0, %i0 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40017010: 91 d0 20 09 ta 9 *obj = val - arg; 40017014: c4 07 00 1d ld [ %i4 + %i5 ], %g2 40017018: 84 00 b0 00 add %g2, -4096, %g2 4001701c: c4 27 00 1d st %g2, [ %i4 + %i5 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40017020: 91 d0 20 0a ta 0xa 40017024: 01 00 00 00 nop rtems_libio_iop_drop( iop ); return rv; } 40017028: 81 c7 e0 08 ret 4001702c: 81 e8 00 00 restore __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40017030: 91 d0 20 09 ta 9 40017034: c4 07 00 1d ld [ %i4 + %i5 ], %g2 40017038: 84 00 b0 00 add %g2, -4096, %g2 4001703c: c4 27 00 1d st %g2, [ %i4 + %i5 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40017040: 91 d0 20 0a ta 0xa 40017044: 01 00 00 00 nop LIBIO_GET_IOP( fd, iop ); 40017048: 7f ff e2 ed call 4000fbfc <__errno> 4001704c: b0 10 3f ff mov -1, %i0 ! ffffffff 40017050: 82 10 20 09 mov 9, %g1 40017054: c2 22 00 00 st %g1, [ %o0 ] 40017058: 81 c7 e0 08 ret 4001705c: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( EFAULT ); 40017060: 7f ff e2 e7 call 4000fbfc <__errno> <== NOT EXECUTED 40017064: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40017068: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4001706c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40017070: 81 c7 e0 08 ret <== NOT EXECUTED 40017074: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40002ca4 : return pthread_getspecific(grp_key); } struct group *getgrent(void) { 40002ca4: 9d e3 bf a0 save %sp, -96, %sp pthread_once(&grp_once, grp_init); 40002ca8: 13 10 00 0b sethi %hi(0x40002c00), %o1 40002cac: 11 10 02 69 sethi %hi(0x4009a400), %o0 40002cb0: 92 12 60 88 or %o1, 0x88, %o1 40002cb4: 40 00 3d 37 call 40012190 40002cb8: 90 12 22 2c or %o0, 0x22c, %o0 return pthread_getspecific(grp_key); 40002cbc: 03 10 02 69 sethi %hi(0x4009a400), %g1 40002cc0: 40 00 3c 11 call 40011d04 40002cc4: d0 00 62 28 ld [ %g1 + 0x228 ], %o0 ! 4009a628 grp_context *ctx = grp_get_context(); if (ctx == NULL) 40002cc8: 94 92 20 00 orcc %o0, 0, %o2 40002ccc: 02 80 00 0f be 40002d08 40002cd0: 01 00 00 00 nop return NULL; if (ctx->fp == NULL) 40002cd4: d0 02 80 00 ld [ %o2 ], %o0 40002cd8: 80 a2 20 00 cmp %o0, 0 40002cdc: 02 80 00 0b be 40002d08 <== NEVER TAKEN 40002ce0: 96 10 21 00 mov 0x100, %o3 return NULL; if (!_libcsupport_scangr(ctx->fp, &ctx->grp, ctx->buf, sizeof(ctx->buf))) 40002ce4: b0 02 a1 04 add %o2, 0x104, %i0 40002ce8: 94 02 a0 04 add %o2, 4, %o2 40002cec: 40 00 06 af call 400047a8 <_libcsupport_scangr> 40002cf0: 92 10 00 18 mov %i0, %o1 40002cf4: 80 a2 20 00 cmp %o0, 0 40002cf8: 02 80 00 04 be 40002d08 40002cfc: 01 00 00 00 nop return NULL; return &ctx->grp; } 40002d00: 81 c7 e0 08 ret 40002d04: 81 e8 00 00 restore 40002d08: 81 c7 e0 08 ret 40002d0c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 40002ea0 : */ int getgroups( int gidsetsize, gid_t grouplist[] ) { 40002ea0: 9d e3 be 80 save %sp, -384, %sp char buf[256]; gid_t gid; const char *user; struct group *grp; rv = getpwuid_r(getuid(), &pwd, &buf[0], sizeof(buf), &pwd_res); 40002ea4: 40 00 00 72 call 4000306c 40002ea8: a0 10 00 18 mov %i0, %l0 40002eac: 98 07 be e0 add %fp, -288, %o4 40002eb0: 91 2a 20 10 sll %o0, 0x10, %o0 40002eb4: 96 10 21 00 mov 0x100, %o3 40002eb8: 94 07 bf 00 add %fp, -256, %o2 40002ebc: 92 07 be e4 add %fp, -284, %o1 40002ec0: 40 00 06 31 call 40004784 40002ec4: 91 32 20 10 srl %o0, 0x10, %o0 if (rv != 0) { 40002ec8: b0 92 20 00 orcc %o0, 0, %i0 40002ecc: 12 80 00 30 bne 40002f8c 40002ed0: f6 17 be ee lduh [ %fp + -274 ], %i3 return rv; } gid = pwd.pw_gid; user = pwd.pw_name; 40002ed4: f8 07 be e4 ld [ %fp + -284 ], %i4 setgrent(); 40002ed8: 7f ff ff 8e call 40002d10 40002edc: b7 2e e0 10 sll %i3, 0x10, %i3 while ((grp = getgrent()) != NULL) { char **mem = &grp->gr_mem[0]; if (grp->gr_gid == gid) { 40002ee0: b7 36 e0 10 srl %i3, 0x10, %i3 while ((grp = getgrent()) != NULL) { 40002ee4: 7f ff ff 70 call 40002ca4 40002ee8: 01 00 00 00 nop 40002eec: 80 a2 20 00 cmp %o0, 0 40002ef0: 02 80 00 19 be 40002f54 40002ef4: 01 00 00 00 nop if (grp->gr_gid == gid) { 40002ef8: c2 12 20 08 lduh [ %o0 + 8 ], %g1 40002efc: 80 a0 40 1b cmp %g1, %i3 40002f00: 02 bf ff f9 be 40002ee4 40002f04: b4 10 00 01 mov %g1, %i2 char **mem = &grp->gr_mem[0]; 40002f08: fa 02 20 0c ld [ %o0 + 0xc ], %i5 continue; } while (*mem != NULL) { 40002f0c: d0 07 40 00 ld [ %i5 ], %o0 40002f10: 80 a2 20 00 cmp %o0, 0 40002f14: 02 bf ff f4 be 40002ee4 40002f18: 92 10 00 1c mov %i4, %o1 if (strcmp(*mem, user) == 0) { 40002f1c: 40 01 6a 2b call 4005d7c8 40002f20: ba 07 60 04 add %i5, 4, %i5 40002f24: 80 a2 20 00 cmp %o0, 0 40002f28: 32 bf ff fa bne,a 40002f10 40002f2c: d0 07 40 00 ld [ %i5 ], %o0 if (rv < gidsetsize) { 40002f30: 80 a6 00 10 cmp %i0, %l0 40002f34: 16 80 00 03 bge 40002f40 40002f38: 83 2e 20 01 sll %i0, 1, %g1 grouplist[rv] = grp->gr_gid; 40002f3c: f4 36 40 01 sth %i2, [ %i1 + %g1 ] while ((grp = getgrent()) != NULL) { 40002f40: 7f ff ff 59 call 40002ca4 40002f44: b0 06 20 01 inc %i0 40002f48: 80 a2 20 00 cmp %o0, 0 40002f4c: 32 bf ff ec bne,a 40002efc 40002f50: c2 12 20 08 lduh [ %o0 + 8 ], %g1 ++mem; } } endgrent(); 40002f54: 7f ff ff 98 call 40002db4 40002f58: 01 00 00 00 nop if (gidsetsize == 0 || rv <= gidsetsize) { 40002f5c: 80 a4 20 00 cmp %l0, 0 40002f60: 02 80 00 0b be 40002f8c 40002f64: 80 a6 00 10 cmp %i0, %l0 40002f68: 14 80 00 0b bg 40002f94 40002f6c: 82 10 20 01 mov 1, %g1 40002f70: 80 88 60 ff btst 0xff, %g1 40002f74: 12 80 00 06 bne 40002f8c <== ALWAYS TAKEN 40002f78: 01 00 00 00 nop return rv; } else { rtems_set_errno_and_return_minus_one(EINVAL); 40002f7c: 40 01 24 e6 call 4004c314 <__errno> 40002f80: b0 10 3f ff mov -1, %i0 ! ffffffff 40002f84: 82 10 20 16 mov 0x16, %g1 40002f88: c2 22 00 00 st %g1, [ %o0 ] } } 40002f8c: 81 c7 e0 08 ret 40002f90: 81 e8 00 00 restore if (gidsetsize == 0 || rv <= gidsetsize) { 40002f94: 82 10 20 00 clr %g1 40002f98: 80 88 60 ff btst 0xff, %g1 40002f9c: 12 bf ff fc bne 40002f8c <== NEVER TAKEN 40002fa0: 01 00 00 00 nop 40002fa4: 30 bf ff f6 b,a 40002f7c =============================================================================== 40001ae0 : { 40001ae0: 9d e3 bf a0 save %sp, -96, %sp if ( !name ) 40001ae4: 80 a6 20 00 cmp %i0, 0 40001ae8: 02 80 00 15 be 40001b3c 40001aec: 80 a6 60 08 cmp %i1, 8 if ( namesize < LOGIN_NAME_MAX ) 40001af0: 08 80 00 0f bleu 40001b2c <== ALWAYS TAKEN 40001af4: 82 10 20 22 mov 0x22, %g1 pw = getpwuid(getuid()); 40001af8: 40 00 00 2f call 40001bb4 <== NOT EXECUTED 40001afc: 01 00 00 00 nop <== NOT EXECUTED 40001b00: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED 40001b04: 40 00 00 1b call 40001b70 <== NOT EXECUTED 40001b08: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED if ( pw ) 40001b0c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40001b10: 02 80 00 09 be 40001b34 <== NOT EXECUTED 40001b14: 13 10 00 4a sethi %hi(0x40012800), %o1 <== NOT EXECUTED pname = pw->pw_name; 40001b18: d2 02 00 00 ld [ %o0 ], %o1 <== NOT EXECUTED strncpy( name, pname, LOGIN_NAME_MAX ); 40001b1c: 94 10 20 09 mov 9, %o2 <== NOT EXECUTED 40001b20: 40 00 3e 79 call 40011504 <== NOT EXECUTED 40001b24: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40001b28: 82 10 20 00 clr %g1 <== NOT EXECUTED return 0; } 40001b2c: 81 c7 e0 08 ret 40001b30: 91 e8 00 01 restore %g0, %g1, %o0 pname = ""; 40001b34: 10 bf ff fa b 40001b1c <== NOT EXECUTED 40001b38: 92 12 61 20 or %o1, 0x120, %o1 <== NOT EXECUTED return EFAULT; 40001b3c: 82 10 20 0e mov 0xe, %g1 } 40001b40: 81 c7 e0 08 ret 40001b44: 91 e8 00 01 restore %g0, %g1, %o0 =============================================================================== 40001ad4 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 40001ad4: 9d e3 bf 48 save %sp, -184, %sp int rv = 0; if ( 40001ad8: 80 a6 e0 01 cmp %i3, 1 40001adc: 18 80 00 b3 bgu 40001da8 40001ae0: 01 00 00 00 nop options == RTEMS_FILESYSTEM_READ_ONLY || options == RTEMS_FILESYSTEM_READ_WRITE ) { rtems_filesystem_fsmount_me_t fsmount_me_h = rtems_filesystem_get_mount_handler( filesystemtype ); 40001ae4: 40 00 00 c6 call 40001dfc 40001ae8: 90 10 00 1a mov %i2, %o0 if ( fsmount_me_h != NULL ) { 40001aec: a2 92 20 00 orcc %o0, 0, %l1 40001af0: 02 80 00 ae be 40001da8 40001af4: 80 a6 60 00 cmp %i1, 0 const char *target = target_or_null != NULL ? target_or_null : "/"; 40001af8: 02 80 00 72 be 40001cc0 40001afc: 90 10 00 19 mov %i1, %o0 size_t target_size = strlen( target ) + 1; 40001b00: 40 00 3a 9a call 40010568 40001b04: a6 10 00 19 mov %i1, %l3 40001b08: a4 02 20 01 add %o0, 1, %l2 size_t filesystemtype_size = strlen( filesystemtype ) + 1; 40001b0c: 40 00 3a 97 call 40010568 40001b10: 90 10 00 1a mov %i2, %o0 strlen( source_or_null ) + 1 : 0; 40001b14: 80 a6 20 00 cmp %i0, 0 size_t filesystemtype_size = strlen( filesystemtype ) + 1; 40001b18: a8 02 20 01 add %o0, 1, %l4 strlen( source_or_null ) + 1 : 0; 40001b1c: 02 80 00 5b be 40001c88 40001b20: ba 02 20 65 add %o0, 0x65, %i5 40001b24: 40 00 3a 91 call 40010568 40001b28: 90 10 00 18 mov %i0, %o0 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) 40001b2c: 92 07 40 12 add %i5, %l2, %o1 strlen( source_or_null ) + 1 : 0; 40001b30: a0 02 20 01 add %o0, 1, %l0 rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 40001b34: 90 10 20 01 mov 1, %o0 40001b38: 40 00 14 d3 call 40006e84 40001b3c: 92 02 40 10 add %o1, %l0, %o1 if ( mt_entry != NULL ) { 40001b40: ba 92 20 00 orcc %o0, 0, %i5 40001b44: 02 80 00 72 be 40001d0c <== NEVER TAKEN 40001b48: 82 07 60 64 add %i5, 0x64, %g1 memcpy( str, filesystemtype, filesystemtype_size ); 40001b4c: 92 10 00 1a mov %i2, %o1 40001b50: 94 10 00 14 mov %l4, %o2 40001b54: 40 00 39 00 call 4000ff54 40001b58: 90 10 00 01 mov %g1, %o0 mt_entry->type = str; 40001b5c: d0 27 60 34 st %o0, [ %i5 + 0x34 ] str += filesystemtype_size; 40001b60: 82 02 00 14 add %o0, %l4, %g1 memcpy( str, source_or_null, source_size ); 40001b64: 94 10 00 10 mov %l0, %o2 40001b68: 92 10 00 18 mov %i0, %o1 40001b6c: 40 00 38 fa call 4000ff54 40001b70: 90 10 00 01 mov %g1, %o0 mt_entry->dev = str; 40001b74: d0 27 60 38 st %o0, [ %i5 + 0x38 ] rtems_filesystem_global_location_t *mt_fs_root = 40001b78: b4 07 60 40 add %i5, 0x40, %i2 str += source_size; 40001b7c: a0 02 00 10 add %o0, %l0, %l0 memcpy( str, target, target_size ); 40001b80: 94 10 00 12 mov %l2, %o2 40001b84: 92 10 00 13 mov %l3, %o1 40001b88: 40 00 38 f3 call 4000ff54 40001b8c: 90 10 00 10 mov %l0, %o0 mt_entry->mounted = true; 40001b90: 82 10 20 01 mov 1, %g1 40001b94: c2 2f 60 28 stb %g1, [ %i5 + 0x28 ] mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf; 40001b98: 03 10 00 5e sethi %hi(0x40017800), %g1 40001b9c: 82 10 63 48 or %g1, 0x348, %g1 ! 40017b48 mt_entry->target = str; 40001ba0: e0 27 60 30 st %l0, [ %i5 + 0x30 ] void *starting_address, size_t number_nodes, size_t node_size ) { _Chain_Initialize( 40001ba4: 96 10 20 24 mov 0x24, %o3 mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf; 40001ba8: c2 27 60 2c st %g1, [ %i5 + 0x2c ] mt_fs_root->reference_count = 1; 40001bac: 82 10 20 01 mov 1, %g1 mt_entry->mt_fs_root = mt_fs_root; 40001bb0: f4 27 60 24 st %i2, [ %i5 + 0x24 ] 40001bb4: 94 10 20 01 mov 1, %o2 mt_fs_root->reference_count = 1; 40001bb8: c2 27 60 58 st %g1, [ %i5 + 0x58 ] 40001bbc: 92 10 00 1a mov %i2, %o1 mt_fs_root->location.mt_entry = mt_entry; 40001bc0: fa 27 60 54 st %i5, [ %i5 + 0x54 ] 40001bc4: 90 07 60 14 add %i5, 0x14, %o0 40001bc8: 40 00 0b 56 call 40004920 <_Chain_Initialize> 40001bcc: b6 0e e0 01 and %i3, 1, %i3 filesystemtype, &target_length ); if ( mt_entry != NULL ) { mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE; 40001bd0: f6 2f 60 29 stb %i3, [ %i5 + 0x29 ] rv = (*fsmount_me_h)( mt_entry, data ); 40001bd4: 92 10 00 1c mov %i4, %o1 40001bd8: 9f c4 40 00 call %l1 40001bdc: 90 10 00 1d mov %i5, %o0 if ( rv == 0 ) { 40001be0: b0 92 20 00 orcc %o0, 0, %i0 40001be4: 12 80 00 25 bne 40001c78 40001be8: 80 a6 60 00 cmp %i1, 0 if ( target != NULL ) { 40001bec: 02 80 00 4e be 40001d24 40001bf0: 94 10 20 1f mov 0x1f, %o2 rtems_filesystem_eval_path_start( &ctx, target, eval_flags ); 40001bf4: 92 10 00 19 mov %i1, %o1 40001bf8: 40 00 02 0c call 40002428 40001bfc: 90 07 bf c8 add %fp, -56, %o0 static inline bool rtems_filesystem_location_is_instance_root( const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; 40001c00: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 return (*mt_entry->ops->are_nodes_equal_h)( 40001c04: c4 00 60 0c ld [ %g1 + 0xc ], %g2 40001c08: c4 00 a0 10 ld [ %g2 + 0x10 ], %g2 40001c0c: 9f c0 80 00 call %g2 40001c10: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 if ( !rtems_filesystem_location_is_instance_root( currentloc ) ) { 40001c14: 80 a2 20 00 cmp %o0, 0 40001c18: 12 80 00 6a bne 40001dc0 40001c1c: 92 07 bf e0 add %fp, -32, %o1 static inline void rtems_filesystem_eval_path_extract_currentloc( rtems_filesystem_eval_path_context_t *ctx, rtems_filesystem_location_info_t *get ) { rtems_filesystem_location_copy_and_detach( 40001c20: 40 00 03 99 call 40002a84 40001c24: 90 07 bf b0 add %fp, -80, %o0 mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc ); 40001c28: 40 00 03 c2 call 40002b30 40001c2c: 90 07 bf b0 add %fp, -80, %o0 rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry ); 40001c30: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 40001c34: c2 00 60 0c ld [ %g1 + 0xc ], %g1 mt_entry->mt_point_node = mt_point_node; 40001c38: d0 27 60 20 st %o0, [ %i5 + 0x20 ] mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc ); 40001c3c: b8 10 00 08 mov %o0, %i4 rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry ); 40001c40: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 40001c44: 9f c0 40 00 call %g1 40001c48: 90 10 00 1d mov %i5, %o0 if ( rv == 0 ) { 40001c4c: b0 92 20 00 orcc %o0, 0, %i0 40001c50: 02 80 00 20 be 40001cd0 40001c54: 90 10 00 1c mov %i4, %o0 rtems_filesystem_global_location_release( mt_point_node, true ); 40001c58: 40 00 03 50 call 40002998 40001c5c: 92 10 20 01 mov 1, %o1 rtems_filesystem_eval_path_cleanup( &ctx ); 40001c60: 40 00 02 14 call 400024b0 40001c64: 90 07 bf c8 add %fp, -56, %o0 } else { rv = register_root_file_system( mt_entry ); } if ( rv != 0 ) { (*mt_entry->ops->fsunmount_me_h)( mt_entry ); 40001c68: c2 07 60 0c ld [ %i5 + 0xc ], %g1 40001c6c: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 40001c70: 9f c0 40 00 call %g1 40001c74: 90 10 00 1d mov %i5, %o0 } } if ( rv != 0 ) { free( mt_entry ); 40001c78: 40 00 14 a2 call 40006f00 40001c7c: 90 10 00 1d mov %i5, %o0 40001c80: 81 c7 e0 08 ret 40001c84: 81 e8 00 00 restore rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 40001c88: 92 07 40 12 add %i5, %l2, %o1 40001c8c: 40 00 14 7e call 40006e84 40001c90: 90 10 20 01 mov 1, %o0 if ( mt_entry != NULL ) { 40001c94: ba 92 20 00 orcc %o0, 0, %i5 40001c98: 02 80 00 1d be 40001d0c <== NEVER TAKEN 40001c9c: 82 07 60 64 add %i5, 0x64, %g1 memcpy( str, filesystemtype, filesystemtype_size ); 40001ca0: 92 10 00 1a mov %i2, %o1 40001ca4: 94 10 00 14 mov %l4, %o2 40001ca8: 90 10 00 01 mov %g1, %o0 40001cac: 40 00 38 aa call 4000ff54 40001cb0: b4 07 60 40 add %i5, 0x40, %i2 mt_entry->type = str; 40001cb4: d0 27 60 34 st %o0, [ %i5 + 0x34 ] str += filesystemtype_size; 40001cb8: 10 bf ff b2 b 40001b80 40001cbc: a0 02 00 14 add %o0, %l4, %l0 const char *target = target_or_null != NULL ? target_or_null : "/"; 40001cc0: 27 10 00 5d sethi %hi(0x40017400), %l3 40001cc4: a4 10 20 02 mov 2, %l2 40001cc8: 10 bf ff 91 b 40001b0c 40001ccc: a6 14 e3 d8 or %l3, 0x3d8, %l3 rtems_libio_lock(); 40001cd0: 40 00 15 01 call 400070d4 40001cd4: 01 00 00 00 nop Chain_Node *old_last; _Assert( _Chain_Is_node_off_chain( the_node ) ); tail = _Chain_Tail( the_chain ); old_last = tail->previous; 40001cd8: 03 10 00 6a sethi %hi(0x4001a800), %g1 40001cdc: 82 10 63 c0 or %g1, 0x3c0, %g1 ! 4001abc0 40001ce0: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_node->next = tail; 40001ce4: 86 00 60 04 add %g1, 4, %g3 tail->previous = the_node; 40001ce8: fa 20 60 08 st %i5, [ %g1 + 8 ] the_node->next = tail; 40001cec: c6 27 40 00 st %g3, [ %i5 ] old_last->next = the_node; 40001cf0: fa 20 80 00 st %i5, [ %g2 ] rtems_libio_unlock(); 40001cf4: 40 00 14 fd call 400070e8 40001cf8: c4 27 60 04 st %g2, [ %i5 + 4 ] rtems_filesystem_eval_path_cleanup( &ctx ); 40001cfc: 40 00 01 ed call 400024b0 40001d00: 90 07 bf c8 add %fp, -56, %o0 if ( rv != 0 ) { 40001d04: 81 c7 e0 08 ret 40001d08: 81 e8 00 00 restore } } else { errno = ENOMEM; 40001d0c: 40 00 37 bc call 4000fbfc <__errno> <== NOT EXECUTED 40001d10: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001d14: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40001d18: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED errno = EINVAL; rv = -1; } return rv; } 40001d1c: 81 c7 e0 08 ret <== NOT EXECUTED 40001d20: 81 e8 00 00 restore <== NOT EXECUTED rtems_libio_lock(); 40001d24: 40 00 14 ec call 400070d4 40001d28: 01 00 00 00 nop return _Chain_Immutable_head( the_chain )->next; 40001d2c: 03 10 00 6a sethi %hi(0x4001a800), %g1 if ( rtems_chain_is_empty( &rtems_filesystem_mount_table ) ) { 40001d30: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 4001abc0 40001d34: 82 10 63 c0 or %g1, 0x3c0, %g1 40001d38: 86 00 60 04 add %g1, 4, %g3 40001d3c: 80 a0 80 03 cmp %g2, %g3 40001d40: 12 80 00 28 bne 40001de0 <== NEVER TAKEN 40001d44: 01 00 00 00 nop old_last = tail->previous; 40001d48: c6 00 60 08 ld [ %g1 + 8 ], %g3 the_node->next = tail; 40001d4c: c4 27 40 00 st %g2, [ %i5 ] rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); 40001d50: b8 07 60 24 add %i5, 0x24, %i4 tail->previous = the_node; 40001d54: fa 20 60 08 st %i5, [ %g1 + 8 ] old_last->next = the_node; 40001d58: fa 20 c0 00 st %i5, [ %g3 ] rtems_libio_unlock(); 40001d5c: 40 00 14 e3 call 400070e8 40001d60: c6 27 60 04 st %g3, [ %i5 + 4 ] 40001d64: 40 00 02 d3 call 400028b0 40001d68: 90 10 00 1c mov %i4, %o0 40001d6c: 92 10 00 08 mov %o0, %o1 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); 40001d70: 90 10 00 1c mov %i4, %o0 40001d74: 40 00 02 cf call 400028b0 40001d78: d2 27 bf ac st %o1, [ %fp + -84 ] &rtems_filesystem_root, 40001d7c: 40 00 03 ba call 40002c64 40001d80: ba 10 00 08 mov %o0, %i5 rtems_filesystem_global_location_assign( 40001d84: d2 07 bf ac ld [ %fp + -84 ], %o1 40001d88: 40 00 02 68 call 40002728 40001d8c: 90 02 20 04 add %o0, 4, %o0 &rtems_filesystem_current, 40001d90: 40 00 03 b5 call 40002c64 40001d94: 01 00 00 00 nop rtems_filesystem_global_location_assign( 40001d98: 40 00 02 64 call 40002728 40001d9c: 92 10 00 1d mov %i5, %o1 if ( rv != 0 ) { 40001da0: 81 c7 e0 08 ret 40001da4: 81 e8 00 00 restore errno = EINVAL; 40001da8: 40 00 37 95 call 4000fbfc <__errno> 40001dac: b0 10 3f ff mov -1, %i0 40001db0: 82 10 20 16 mov 0x16, %g1 40001db4: c2 22 00 00 st %g1, [ %o0 ] return rv; 40001db8: 81 c7 e0 08 ret 40001dbc: 81 e8 00 00 restore rtems_filesystem_eval_path_error( &ctx, EBUSY ); 40001dc0: 90 07 bf c8 add %fp, -56, %o0 40001dc4: 40 00 01 a5 call 40002458 40001dc8: 92 10 20 10 mov 0x10, %o1 rv = -1; 40001dcc: b0 10 3f ff mov -1, %i0 rtems_filesystem_eval_path_cleanup( &ctx ); 40001dd0: 40 00 01 b8 call 400024b0 40001dd4: 90 07 bf c8 add %fp, -56, %o0 (*mt_entry->ops->fsunmount_me_h)( mt_entry ); 40001dd8: 10 bf ff a5 b 40001c6c 40001ddc: c2 07 60 0c ld [ %i5 + 0xc ], %g1 errno = EINVAL; 40001de0: 40 00 37 87 call 4000fbfc <__errno> <== NOT EXECUTED 40001de4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001de8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40001dec: 40 00 14 bf call 400070e8 <== NOT EXECUTED 40001df0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED (*mt_entry->ops->fsunmount_me_h)( mt_entry ); 40001df4: 10 bf ff 9e b 40001c6c <== NOT EXECUTED 40001df8: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED =============================================================================== 40004084 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 40004084: 9d e3 bf a0 save %sp, -96, %sp int rv = -1; if (target != NULL) { 40004088: 90 96 60 00 orcc %i1, 0, %o0 4000408c: 02 80 00 0b be 400040b8 40004090: 01 00 00 00 nop rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); 40004094: 40 00 02 91 call 40004ad8 40004098: 92 10 21 ff mov 0x1ff, %o1 ! 1ff if (rv == 0) { 4000409c: 80 a2 20 00 cmp %o0, 0 400040a0: 02 80 00 04 be 400040b0 <== ALWAYS TAKEN 400040a4: 01 00 00 00 nop } else { errno = EINVAL; } return rv; } 400040a8: 81 c7 e0 08 ret 400040ac: 91 e8 00 08 restore %g0, %o0, %o0 rv = mount( 400040b0: 7f ff ff 00 call 40003cb0 400040b4: 81 e8 00 00 restore errno = EINVAL; 400040b8: 40 00 67 47 call 4001ddd4 <__errno> 400040bc: 01 00 00 00 nop 400040c0: 82 10 20 16 mov 0x16, %g1 ! 16 <_TLS_Alignment+0x15> 400040c4: c2 22 00 00 st %g1, [ %o0 ] return rv; 400040c8: 10 bf ff f8 b 400040a8 400040cc: 90 10 3f ff mov -1, %o0 =============================================================================== 4000ab90 : /** * POSIX 1003.1 5.3.1 - Open a File */ int open( const char *path, int oflag, ... ) { 4000ab90: 9d e3 be f8 save %sp, -264, %sp mode_t mode = 0; rtems_libio_t *iop = NULL; va_start( ap, oflag ); mode = va_arg( ap, mode_t ); 4000ab94: 82 07 a0 50 add %fp, 0x50, %g1 va_start( ap, oflag ); 4000ab98: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 4000ab9c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 4000aba0: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 4000aba4: f8 27 a0 54 st %i4, [ %fp + 0x54 ] iop = rtems_libio_allocate(); 4000aba8: 40 00 04 c2 call 4000beb0 4000abac: c2 27 bf 5c st %g1, [ %fp + -164 ] if ( iop != NULL ) { 4000abb0: ba 92 20 00 orcc %o0, 0, %i5 4000abb4: 02 80 00 96 be 4000ae0c 4000abb8: 82 06 60 01 add %i1, 1, %g1 int follow = (oflag & O_NOFOLLOW) == O_NOFOLLOW ? 0 : RTEMS_FS_FOLLOW_LINK; 4000abbc: 95 2e 60 0b sll %i1, 0xb, %o2 bool write_access = (rwflag & _FWRITE) == _FWRITE; 4000abc0: b6 08 60 02 and %g1, 2, %i3 int follow = (oflag & O_NOFOLLOW) == O_NOFOLLOW ? 0 : RTEMS_FS_FOLLOW_LINK; 4000abc4: 95 3a a0 1f sra %o2, 0x1f, %o2 bool make = (oflag & O_CREAT) == O_CREAT; 4000abc8: 86 0e 62 00 and %i1, 0x200, %g3 int follow = (oflag & O_NOFOLLOW) == O_NOFOLLOW ? 0 : RTEMS_FS_FOLLOW_LINK; 4000abcc: 94 0a bf e8 and %o2, -24, %o2 bool exclusive = (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL); 4000abd0: 84 0e 6a 00 and %i1, 0xa00, %g2 | (read_access ? RTEMS_FS_PERMS_READ : 0) 4000abd4: 80 88 60 01 btst 1, %g1 4000abd8: 02 80 00 03 be 4000abe4 4000abdc: 94 02 a0 18 add %o2, 0x18, %o2 4000abe0: 94 12 a0 04 or %o2, 4, %o2 | (write_access ? RTEMS_FS_PERMS_WRITE : 0) 4000abe4: 80 a6 e0 00 cmp %i3, 0 4000abe8: 32 80 00 02 bne,a 4000abf0 4000abec: 94 12 a0 02 or %o2, 2, %o2 | (make ? RTEMS_FS_MAKE : 0) 4000abf0: 80 a0 e0 00 cmp %g3, 0 4000abf4: 32 80 00 02 bne,a 4000abfc 4000abf8: 94 12 a0 20 or %o2, 0x20, %o2 | (exclusive ? RTEMS_FS_EXCLUSIVE : 0); 4000abfc: 80 a0 aa 00 cmp %g2, 0xa00 4000ac00: 22 80 00 02 be,a 4000ac08 4000ac04: 94 12 a0 40 or %o2, 0x40, %o2 rtems_filesystem_eval_path_start( &ctx, path, eval_flags ); 4000ac08: 92 10 00 18 mov %i0, %o1 4000ac0c: 7f ff de 07 call 40002428 4000ac10: 90 07 bf 60 add %fp, -160, %o0 return ctx->tokenlen > 0; 4000ac14: f8 07 bf 6c ld [ %fp + -148 ], %i4 if ( rtems_filesystem_eval_path_has_token( &ctx ) ) { 4000ac18: 80 a7 20 00 cmp %i4, 0 4000ac1c: 12 80 00 56 bne 4000ad74 4000ac20: e0 07 bf 68 ld [ %fp + -152 ], %l0 open_dir = ( oflag & O_DIRECTORY ) == O_DIRECTORY; 4000ac24: 39 00 08 00 sethi %hi(0x200000), %i4 4000ac28: b8 0e 40 1c and %i1, %i4, %i4 if ( write_access || open_dir ) { 4000ac2c: 80 96 c0 1c orcc %i3, %i4, %g0 4000ac30: 02 80 00 17 be 4000ac8c 4000ac34: 92 07 bf 78 add %fp, -136, %o1 ) { struct stat st; st.st_mode = 0; (void) ( *loc->handlers->fstat_h )( loc, &st ); 4000ac38: c2 07 bf 88 ld [ %fp + -120 ], %g1 st.st_mode = 0; 4000ac3c: c0 27 bf a8 clr [ %fp + -88 ] (void) ( *loc->handlers->fstat_h )( loc, &st ); 4000ac40: 92 07 bf 98 add %fp, -104, %o1 4000ac44: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 4000ac48: 9f c0 40 00 call %g1 4000ac4c: 90 07 bf 78 add %fp, -136, %o0 if ( write_access && S_ISDIR( type ) ) { 4000ac50: 80 a6 e0 00 cmp %i3, 0 4000ac54: 02 80 00 5a be 4000adbc 4000ac58: c2 07 bf a8 ld [ %fp + -88 ], %g1 4000ac5c: 05 00 00 3c sethi %hi(0xf000), %g2 4000ac60: 82 08 40 02 and %g1, %g2, %g1 4000ac64: 05 00 00 10 sethi %hi(0x4000), %g2 4000ac68: 80 a0 40 02 cmp %g1, %g2 4000ac6c: 02 80 00 63 be 4000adf8 4000ac70: 80 a7 20 00 cmp %i4, 0 if ( open_dir && !S_ISDIR( type ) ) { 4000ac74: 02 80 00 06 be 4000ac8c <== ALWAYS TAKEN 4000ac78: 92 07 bf 78 add %fp, -136, %o1 rtems_filesystem_eval_path_error( &ctx, ENOTDIR ); 4000ac7c: 92 10 20 14 mov 0x14, %o1 <== NOT EXECUTED 4000ac80: 7f ff dd f6 call 40002458 4000ac84: 90 07 bf 60 add %fp, -160, %o0 rtems_filesystem_location_copy_and_detach( 4000ac88: 92 07 bf 78 add %fp, -136, %o1 4000ac8c: 7f ff df 7e call 40002a84 4000ac90: 90 07 60 10 add %i5, 0x10, %o0 rtems_filesystem_eval_path_cleanup( &ctx ); 4000ac94: 7f ff de 07 call 400024b0 4000ac98: 90 07 bf 60 add %fp, -160, %o0 rtems_libio_iop_flags_set( iop, rtems_libio_fcntl_flags( oflag ) ); 4000ac9c: 40 00 04 78 call 4000be7c 4000aca0: 90 10 00 19 mov %i1, %o0 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 4000aca4: 91 d0 20 09 ta 9 ISR_Level level; (void) order; _ISR_Local_disable( level ); val = *obj; *obj = val | arg; 4000aca8: c4 07 40 00 ld [ %i5 ], %g2 4000acac: 90 10 80 08 or %g2, %o0, %o0 4000acb0: d0 27 40 00 st %o0, [ %i5 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000acb4: 91 d0 20 0a ta 0xa 4000acb8: 01 00 00 00 nop rv = (*iop->pathinfo.handlers->open_h)( iop, path, oflag, mode ); 4000acbc: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 4000acc0: c2 00 40 00 ld [ %g1 ], %g1 4000acc4: 92 10 00 18 mov %i0, %o1 4000acc8: 96 10 00 1a mov %i2, %o3 4000accc: 94 10 00 19 mov %i1, %o2 4000acd0: 9f c0 40 00 call %g1 4000acd4: 90 10 00 1d mov %i5, %o0 if ( rv == 0 ) { 4000acd8: b0 92 20 00 orcc %o0, 0, %i0 4000acdc: 22 80 00 07 be,a 4000acf8 4000ace0: 31 10 00 6c sethi %hi(0x4001b000), %i0 if ( rv < 0 ) { 4000ace4: 80 a6 20 00 cmp %i0, 0 4000ace8: 06 80 00 1f bl 4000ad64 4000acec: 01 00 00 00 nop } va_end( ap ); return rv; } 4000acf0: 81 c7 e0 08 ret 4000acf4: 81 e8 00 00 restore int fd = rtems_libio_iop_to_descriptor( iop ); 4000acf8: 11 2a aa aa sethi %hi(0xaaaaa800), %o0 4000acfc: b0 16 21 20 or %i0, 0x120, %i0 4000ad00: 90 12 22 ab or %o0, 0x2ab, %o0 4000ad04: b0 27 40 18 sub %i5, %i0, %i0 4000ad08: b1 3e 20 04 sra %i0, 4, %i0 4000ad0c: b0 5e 00 08 smul %i0, %o0, %i0 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 4000ad10: 91 d0 20 09 ta 9 4000ad14: c4 07 40 00 ld [ %i5 ], %g2 4000ad18: 84 10 a1 00 or %g2, 0x100, %g2 4000ad1c: c4 27 40 00 st %g2, [ %i5 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4000ad20: 91 d0 20 0a ta 0xa 4000ad24: 01 00 00 00 nop if ( truncate ) { 4000ad28: 80 8e 64 00 btst 0x400, %i1 4000ad2c: 02 bf ff ef be 4000ace8 4000ad30: 80 a6 20 00 cmp %i0, 0 rv = ftruncate( fd, 0 ); 4000ad34: 92 10 20 00 clr %o1 4000ad38: 94 10 20 00 clr %o2 4000ad3c: 40 00 04 10 call 4000bd7c 4000ad40: 90 10 00 18 mov %i0, %o0 if ( rv != 0 ) { 4000ad44: 80 a2 20 00 cmp %o0, 0 4000ad48: 02 bf ff e8 be 4000ace8 4000ad4c: 80 a6 20 00 cmp %i0, 0 (*iop->pathinfo.handlers->close_h)( iop ); 4000ad50: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 4000ad54: c2 00 60 04 ld [ %g1 + 4 ], %g1 4000ad58: 90 10 00 1d mov %i5, %o0 4000ad5c: 9f c0 40 00 call %g1 4000ad60: b0 10 3f ff mov -1, %i0 rtems_libio_free( iop ); 4000ad64: 40 00 04 68 call 4000bf04 4000ad68: 90 10 00 1d mov %i5, %o0 return rv; 4000ad6c: 81 c7 e0 08 ret 4000ad70: 81 e8 00 00 restore rv = rtems_filesystem_mknod( 4000ad74: 98 10 20 00 clr %o4 4000ad78: 9a 10 20 00 clr %o5 4000ad7c: 17 00 00 20 sethi %hi(0x8000), %o3 4000ad80: 94 10 00 1c mov %i4, %o2 4000ad84: 96 16 80 0b or %i2, %o3, %o3 4000ad88: 92 10 00 10 mov %l0, %o1 4000ad8c: 7f ff db 14 call 400019dc 4000ad90: 90 07 bf 78 add %fp, -136, %o0 if ( rv == 0 ) { 4000ad94: 80 a2 20 00 cmp %o0, 0 4000ad98: 12 80 00 14 bne 4000ade8 4000ad9c: 92 10 20 00 clr %o1 ctx->flags = flags; 4000ada0: c0 27 bf 70 clr [ %fp + -144 ] rtems_filesystem_eval_path_continue( ctx ); 4000ada4: 90 07 bf 60 add %fp, -160, %o0 ctx->path = path; 4000ada8: e0 27 bf 60 st %l0, [ %fp + -160 ] 4000adac: 7f ff dd 11 call 400021f0 4000adb0: f8 27 bf 64 st %i4, [ %fp + -156 ] 4000adb4: 10 bf ff 9d b 4000ac28 4000adb8: 39 00 08 00 sethi %hi(0x200000), %i4 if ( open_dir && !S_ISDIR( type ) ) { 4000adbc: 80 a7 20 00 cmp %i4, 0 4000adc0: 02 bf ff b3 be 4000ac8c <== NEVER TAKEN 4000adc4: 92 07 bf 78 add %fp, -136, %o1 4000adc8: 05 00 00 3c sethi %hi(0xf000), %g2 4000adcc: 82 08 40 02 and %g1, %g2, %g1 4000add0: 05 00 00 10 sethi %hi(0x4000), %g2 4000add4: 80 a0 40 02 cmp %g1, %g2 4000add8: 02 bf ff ad be 4000ac8c 4000addc: 01 00 00 00 nop 4000ade0: 10 bf ff a8 b 4000ac80 4000ade4: 92 10 20 14 mov 0x14, %o1 ! 14 <_TLS_Alignment+0x13> rtems_filesystem_eval_path_error( ctx, 0 ); 4000ade8: 7f ff dd 9c call 40002458 4000adec: 90 07 bf 60 add %fp, -160, %o0 open_dir = ( oflag & O_DIRECTORY ) == O_DIRECTORY; 4000adf0: 10 bf ff 8e b 4000ac28 4000adf4: 39 00 08 00 sethi %hi(0x200000), %i4 rtems_filesystem_eval_path_error( &ctx, EISDIR ); 4000adf8: 92 10 20 15 mov 0x15, %o1 4000adfc: 7f ff dd 97 call 40002458 4000ae00: 90 07 bf 60 add %fp, -160, %o0 rtems_filesystem_location_copy_and_detach( 4000ae04: 10 bf ff a2 b 4000ac8c 4000ae08: 92 07 bf 78 add %fp, -136, %o1 errno = ENFILE; 4000ae0c: 40 00 13 7c call 4000fbfc <__errno> 4000ae10: b0 10 3f ff mov -1, %i0 4000ae14: 82 10 20 17 mov 0x17, %g1 4000ae18: c2 22 00 00 st %g1, [ %o0 ] return rv; 4000ae1c: 81 c7 e0 08 ret 4000ae20: 81 e8 00 00 restore =============================================================================== 400049ac : void **pointer, size_t alignment, size_t size ) { if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 400049ac: 84 02 7f ff add %o1, -1, %g2 400049b0: 80 88 80 09 btst %g2, %o1 400049b4: 12 80 00 07 bne 400049d0 <== NEVER TAKEN 400049b8: 80 a2 60 03 cmp %o1, 3 400049bc: 08 80 00 05 bleu 400049d0 400049c0: 01 00 00 00 nop /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); 400049c4: 82 13 c0 00 mov %o7, %g1 400049c8: 40 00 00 a7 call 40004c64 400049cc: 9e 10 40 00 mov %g1, %o7 } 400049d0: 81 c3 e0 08 retl 400049d4: 90 10 20 16 mov 0x16, %o0 =============================================================================== 4001718c : #endif #if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 500 ssize_t pread (int __fd, void *__buf, size_t __nbytes, off_t __offset); ssize_t pwrite (int __fd, const void *__buf, size_t __nbytes, off_t __offset); #endif _READ_WRITE_RETURN_TYPE read (int __fd, void *__buf, size_t __nbyte); 4001718c: 9d e3 bf a0 save %sp, -96, %sp 40017190: 39 10 00 6c sethi %hi(0x4001b000), %i4 40017194: bb 2e 20 01 sll %i0, 1, %i5 40017198: b8 17 21 20 or %i4, 0x120, %i4 4001719c: ba 07 40 18 add %i5, %i0, %i5 400171a0: bb 2f 60 04 sll %i5, 4, %i5 400171a4: 90 07 40 1c add %i5, %i4, %o0 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 400171a8: 91 d0 20 09 ta 9 val = *obj; 400171ac: c4 07 40 1c ld [ %i5 + %i4 ], %g2 *obj = val + arg; 400171b0: 86 20 b0 00 sub %g2, -4096, %g3 400171b4: c6 27 40 1c st %g3, [ %i5 + %i4 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 400171b8: 91 d0 20 0a ta 0xa 400171bc: 01 00 00 00 nop ssize_t n; rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); LIBIO_GET_IOP_WITH_ACCESS( fd, iop, LIBIO_FLAGS_READ, EBADF ); 400171c0: 84 08 a1 02 and %g2, 0x102, %g2 400171c4: 80 a0 a1 02 cmp %g2, 0x102 400171c8: 12 80 00 0f bne 40017204 <== NEVER TAKEN 400171cc: 94 10 00 1a mov %i2, %o2 /* * Now process the read(). */ n = (*iop->pathinfo.handlers->read_h)( iop, buffer, count ); 400171d0: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 400171d4: c2 00 60 08 ld [ %g1 + 8 ], %g1 400171d8: 9f c0 40 00 call %g1 400171dc: 92 10 00 19 mov %i1, %o1 400171e0: b0 10 00 08 mov %o0, %i0 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 400171e4: 91 d0 20 09 ta 9 *obj = val - arg; 400171e8: c4 07 00 1d ld [ %i4 + %i5 ], %g2 400171ec: 84 00 b0 00 add %g2, -4096, %g2 400171f0: c4 27 00 1d st %g2, [ %i4 + %i5 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 400171f4: 91 d0 20 0a ta 0xa 400171f8: 01 00 00 00 nop rtems_libio_iop_drop( iop ); return n; } 400171fc: 81 c7 e0 08 ret 40017200: 81 e8 00 00 restore __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40017204: 91 d0 20 09 ta 9 <== NOT EXECUTED 40017208: c4 07 00 1d ld [ %i4 + %i5 ], %g2 <== NOT EXECUTED 4001720c: 84 00 b0 00 add %g2, -4096, %g2 <== NOT EXECUTED 40017210: c4 27 00 1d st %g2, [ %i4 + %i5 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40017214: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40017218: 01 00 00 00 nop <== NOT EXECUTED LIBIO_GET_IOP_WITH_ACCESS( fd, iop, LIBIO_FLAGS_READ, EBADF ); 4001721c: 7f ff e2 78 call 4000fbfc <__errno> <== NOT EXECUTED 40017220: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40017224: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40017228: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001722c: 81 c7 e0 08 ret <== NOT EXECUTED 40017230: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 400172d4 : return new_ptr; } void *realloc( void *ptr, size_t size ) { 400172d4: 9d e3 bf 98 save %sp, -104, %sp Heap_Control *heap; Heap_Resize_status status; uintptr_t old_size; uintptr_t avail_size; if ( size == 0 ) { 400172d8: 80 a6 60 00 cmp %i1, 0 400172dc: 02 80 00 40 be 400173dc <== NEVER TAKEN 400172e0: 80 a6 20 00 cmp %i0, 0 free( ptr ); return NULL; } if ( ptr == NULL ) { 400172e4: 02 80 00 3c be 400173d4 400172e8: 03 10 00 72 sethi %hi(0x4001c800), %g1 return malloc( size ); } heap = RTEMS_Malloc_Heap; switch ( _Malloc_System_state() ) { 400172ec: 7f ff bf 98 call 4000714c <_Malloc_System_state> 400172f0: fa 00 60 28 ld [ %g1 + 0x28 ], %i5 ! 4001c828 400172f4: 80 a2 20 00 cmp %o0, 0 400172f8: 02 80 00 29 be 4001739c 400172fc: 01 00 00 00 nop 40017300: 80 a2 20 01 cmp %o0, 1 <== NOT EXECUTED 40017304: 32 80 00 24 bne,a 40017394 <== NEVER TAKEN 40017308: ba 10 20 00 clr %i5 <== NOT EXECUTED _Malloc_Process_deferred_frees(); status = _Heap_Resize_block( heap, ptr, size, &old_size, &avail_size ); _RTEMS_Unlock_allocator(); break; case MALLOC_SYSTEM_STATE_NO_PROTECTION: status = _Heap_Resize_block( heap, ptr, size, &old_size, &avail_size ); 4001730c: 98 07 bf fc add %fp, -4, %o4 40017310: 96 07 bf f8 add %fp, -8, %o3 40017314: 94 10 00 19 mov %i1, %o2 40017318: 92 10 00 18 mov %i0, %o1 4001731c: 40 00 00 6e call 400174d4 <_Heap_Resize_block> 40017320: 90 10 00 1d mov %i5, %o0 40017324: b8 10 00 08 mov %o0, %i4 break; default: return NULL; } switch ( status ) { 40017328: 80 a7 20 00 cmp %i4, 0 4001732c: 02 80 00 1a be 40017394 40017330: ba 10 00 18 mov %i0, %i5 40017334: 80 a7 20 01 cmp %i4, 1 40017338: 12 80 00 13 bne 40017384 4001733c: ba 10 20 00 clr %i5 case HEAP_RESIZE_SUCCESSFUL: return ptr; case HEAP_RESIZE_UNSATISFIED: return new_alloc( ptr, size, old_size ); 40017340: f8 07 bf f8 ld [ %fp + -8 ], %i4 new_ptr = malloc( new_size ); 40017344: 7f ff bf 6e call 400070fc 40017348: 90 10 00 19 mov %i1, %o0 if ( new_ptr == NULL ) { 4001734c: ba 92 20 00 orcc %o0, 0, %i5 40017350: 02 80 00 11 be 40017394 40017354: 80 a7 00 19 cmp %i4, %i1 memcpy( new_ptr, old_ptr, ( new_size < old_size ) ? new_size : old_size ); 40017358: 08 80 00 03 bleu 40017364 <== ALWAYS TAKEN 4001735c: 94 10 00 1c mov %i4, %o2 40017360: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 40017364: 92 10 00 18 mov %i0, %o1 40017368: 7f ff e2 fb call 4000ff54 4001736c: 90 10 00 1d mov %i5, %o0 free( old_ptr ); 40017370: 90 10 00 18 mov %i0, %o0 40017374: 7f ff be e3 call 40006f00 40017378: b0 10 00 1d mov %i5, %i0 default: errno = EINVAL; return NULL; } } 4001737c: 81 c7 e0 08 ret 40017380: 81 e8 00 00 restore errno = EINVAL; 40017384: 7f ff e2 1e call 4000fbfc <__errno> 40017388: 01 00 00 00 nop 4001738c: 82 10 20 16 mov 0x16, %g1 ! 16 <_TLS_Alignment+0x15> 40017390: c2 22 00 00 st %g1, [ %o0 ] } 40017394: 81 c7 e0 08 ret 40017398: 91 e8 00 1d restore %g0, %i5, %o0 _RTEMS_Lock_allocator(); 4001739c: 7f ff c2 51 call 40007ce0 <_RTEMS_Lock_allocator> 400173a0: 01 00 00 00 nop _Malloc_Process_deferred_frees(); 400173a4: 7f ff be f8 call 40006f84 <_Malloc_Process_deferred_frees> 400173a8: 01 00 00 00 nop status = _Heap_Resize_block( heap, ptr, size, &old_size, &avail_size ); 400173ac: 98 07 bf fc add %fp, -4, %o4 400173b0: 96 07 bf f8 add %fp, -8, %o3 400173b4: 94 10 00 19 mov %i1, %o2 400173b8: 92 10 00 18 mov %i0, %o1 400173bc: 40 00 00 46 call 400174d4 <_Heap_Resize_block> 400173c0: 90 10 00 1d mov %i5, %o0 _RTEMS_Unlock_allocator(); 400173c4: 7f ff c2 4c call 40007cf4 <_RTEMS_Unlock_allocator> 400173c8: b8 10 00 08 mov %o0, %i4 break; 400173cc: 10 bf ff d8 b 4001732c 400173d0: 80 a7 20 00 cmp %i4, 0 return malloc( size ); 400173d4: 7f ff bf 4a call 400070fc 400173d8: 91 e8 00 19 restore %g0, %i1, %o0 free( ptr ); 400173dc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400173e0: 7f ff be c8 call 40006f00 <== NOT EXECUTED 400173e4: ba 10 20 00 clr %i5 <== NOT EXECUTED return NULL; 400173e8: 30 bf ff eb b,a 40017394 <== NOT EXECUTED =============================================================================== 40004d7c : * components. Returns (resolved) on success, or (NULL) on failure, * in which case the path which caused trouble is left in (resolved). */ char * realpath(const char * __restrict path, char * __restrict resolved) { 40004d7c: 9d e3 bc 38 save %sp, -968, %sp <== NOT EXECUTED size_t left_len, resolved_len; unsigned symlinks; int m, slen; char left[PATH_MAX], next_token[PATH_MAX], symlink[PATH_MAX]; if (path == NULL) { 40004d80: b8 96 20 00 orcc %i0, 0, %i4 <== NOT EXECUTED 40004d84: 02 80 01 10 be 400051c4 <== NOT EXECUTED 40004d88: 01 00 00 00 nop <== NOT EXECUTED errno = EINVAL; return (NULL); } if (path[0] == '\0') { 40004d8c: fa 0f 00 00 ldub [ %i4 ], %i5 <== NOT EXECUTED 40004d90: bb 2f 60 18 sll %i5, 0x18, %i5 <== NOT EXECUTED 40004d94: 80 a7 60 00 cmp %i5, 0 <== NOT EXECUTED 40004d98: 02 80 00 f5 be 4000516c <== NOT EXECUTED 40004d9c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED errno = ENOENT; return (NULL); } if (resolved == NULL) { 40004da0: 02 80 00 e3 be 4000512c <== NOT EXECUTED 40004da4: a8 10 20 00 clr %l4 <== NOT EXECUTED return (NULL); m = 1; } else m = 0; symlinks = 0; if (path[0] == '/') { 40004da8: bb 3f 60 18 sra %i5, 0x18, %i5 <== NOT EXECUTED 40004dac: 80 a7 60 2f cmp %i5, 0x2f <== NOT EXECUTED 40004db0: 12 80 00 68 bne 40004f50 <== NOT EXECUTED 40004db4: 92 10 20 ff mov 0xff, %o1 <== NOT EXECUTED resolved[0] = '/'; 40004db8: fa 2e 40 00 stb %i5, [ %i1 ] <== NOT EXECUTED resolved[1] = '\0'; 40004dbc: c0 2e 60 01 clrb [ %i1 + 1 ] <== NOT EXECUTED if (path[1] == '\0') 40004dc0: c2 4f 20 01 ldsb [ %i4 + 1 ], %g1 <== NOT EXECUTED 40004dc4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004dc8: 02 80 00 60 be 40004f48 <== NOT EXECUTED 40004dcc: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED return (resolved); resolved_len = 1; left_len = strlcpy(left, path + 1, sizeof(left)); 40004dd0: a0 07 bd 00 add %fp, -768, %l0 <== NOT EXECUTED 40004dd4: 94 10 20 ff mov 0xff, %o2 <== NOT EXECUTED 40004dd8: 92 07 20 01 add %i4, 1, %o1 <== NOT EXECUTED 40004ddc: 40 01 64 a9 call 4005e080 <== NOT EXECUTED 40004de0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED resolved_len = 1; 40004de4: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED 40004de8: 84 10 20 00 clr %g2 <== NOT EXECUTED left_len = strlcpy(left, path + 1, sizeof(left)); 40004dec: b6 10 00 08 mov %o0, %i3 <== NOT EXECUTED return (NULL); } resolved_len = strlen(resolved); left_len = strlcpy(left, path, sizeof(left)); } if (left_len >= sizeof(left) || resolved_len >= PATH_MAX) { 40004df0: 80 a6 e0 fe cmp %i3, 0xfe <== NOT EXECUTED 40004df4: 18 80 00 03 bgu 40004e00 <== NOT EXECUTED 40004df8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40004dfc: 82 10 20 00 clr %g1 <== NOT EXECUTED 40004e00: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED 40004e04: 12 80 00 91 bne 40005048 <== NOT EXECUTED 40004e08: 80 88 a0 ff btst 0xff, %g2 <== NOT EXECUTED 40004e0c: 12 80 00 8f bne 40005048 <== NOT EXECUTED 40004e10: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED } /* * Iterate over path components in `left'. */ while (left_len != 0) { 40004e14: 02 80 00 44 be 40004f24 <== NOT EXECUTED 40004e18: ac 10 20 00 clr %l6 <== NOT EXECUTED errno = ENOTDIR; return (NULL); } continue; } else if (strcmp(next_token, ".") == 0) 40004e1c: 31 00 00 0b sethi %hi(0x2c00), %i0 <== NOT EXECUTED resolved[resolved_len++] = '/'; 40004e20: a2 10 20 2f mov 0x2f, %l1 <== NOT EXECUTED else if (strcmp(next_token, ".") == 0) 40004e24: a4 16 22 00 or %i0, 0x200, %l2 <== NOT EXECUTED if (lstat(resolved, &sb) != 0) { if (m) free(resolved); return (NULL); } if (S_ISLNK(sb.st_mode)) { 40004e28: 27 00 00 3c sethi %hi(0xf000), %l3 <== NOT EXECUTED else if (strcmp(next_token, "..") == 0) { 40004e2c: b0 16 22 2e or %i0, 0x22e, %i0 <== NOT EXECUTED if (S_ISLNK(sb.st_mode)) { 40004e30: 2f 00 00 28 sethi %hi(0xa000), %l7 <== NOT EXECUTED if (!S_ISDIR(sb.st_mode)) { 40004e34: 2b 00 00 10 sethi %hi(0x4000), %l5 <== NOT EXECUTED p = strchr(left, '/'); 40004e38: 92 10 20 2f mov 0x2f, %o1 <== NOT EXECUTED 40004e3c: 40 01 61 ff call 4005d638 <== NOT EXECUTED 40004e40: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED s = p ? p : left + left_len; 40004e44: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED 40004e48: 02 80 00 68 be 40004fe8 <== NOT EXECUTED 40004e4c: b4 27 00 10 sub %i4, %l0, %i2 <== NOT EXECUTED if (s - left >= sizeof(next_token)) { 40004e50: 80 a6 a0 fe cmp %i2, 0xfe <== NOT EXECUTED 40004e54: 18 80 00 7d bgu 40005048 <== NOT EXECUTED 40004e58: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED memcpy(next_token, left, s - left); 40004e5c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED left_len -= s - left; 40004e60: b6 26 c0 1a sub %i3, %i2, %i3 <== NOT EXECUTED memcpy(next_token, left, s - left); 40004e64: 90 07 be 00 add %fp, -512, %o0 <== NOT EXECUTED 40004e68: 40 01 33 d6 call 40051dc0 <== NOT EXECUTED 40004e6c: b4 07 80 1a add %fp, %i2, %i2 <== NOT EXECUTED next_token[s - left] = '\0'; 40004e70: c0 2e be 00 clrb [ %i2 + -512 ] <== NOT EXECUTED memmove(left, s + 1, left_len + 1); 40004e74: 94 06 e0 01 add %i3, 1, %o2 <== NOT EXECUTED 40004e78: 92 07 20 01 add %i4, 1, %o1 <== NOT EXECUTED 40004e7c: 40 01 34 10 call 40051ebc <== NOT EXECUTED 40004e80: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if (resolved[resolved_len - 1] != '/') { 40004e84: 82 06 40 1d add %i1, %i5, %g1 <== NOT EXECUTED 40004e88: c2 48 7f ff ldsb [ %g1 + -1 ], %g1 <== NOT EXECUTED 40004e8c: 80 a0 60 2f cmp %g1, 0x2f <== NOT EXECUTED 40004e90: 02 80 00 08 be 40004eb0 <== NOT EXECUTED 40004e94: 82 07 60 01 add %i5, 1, %g1 <== NOT EXECUTED if (resolved_len + 1 >= PATH_MAX) { 40004e98: 80 a0 60 fe cmp %g1, 0xfe <== NOT EXECUTED 40004e9c: 18 80 00 6c bgu 4000504c <== NOT EXECUTED 40004ea0: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED resolved[resolved_len++] = '/'; 40004ea4: e2 2e 40 1d stb %l1, [ %i1 + %i5 ] <== NOT EXECUTED resolved[resolved_len] = '\0'; 40004ea8: ba 10 00 01 mov %g1, %i5 <== NOT EXECUTED 40004eac: c0 2e 40 01 clrb [ %i1 + %g1 ] <== NOT EXECUTED if (next_token[0] == '\0') { 40004eb0: c2 4f be 00 ldsb [ %fp + -512 ], %g1 <== NOT EXECUTED 40004eb4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004eb8: 02 80 00 39 be 40004f9c <== NOT EXECUTED 40004ebc: c2 17 be 00 lduh [ %fp + -512 ], %g1 <== NOT EXECUTED else if (strcmp(next_token, ".") == 0) 40004ec0: 80 a0 40 12 cmp %g1, %l2 <== NOT EXECUTED 40004ec4: 02 80 00 15 be 40004f18 <== NOT EXECUTED 40004ec8: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED else if (strcmp(next_token, "..") == 0) { 40004ecc: 02 80 00 51 be 40005010 <== NOT EXECUTED 40004ed0: c2 0f be 02 ldub [ %fp + -510 ], %g1 <== NOT EXECUTED resolved_len = strlcat(resolved, next_token, PATH_MAX); 40004ed4: 94 10 20 ff mov 0xff, %o2 <== NOT EXECUTED 40004ed8: 92 07 be 00 add %fp, -512, %o1 <== NOT EXECUTED 40004edc: 40 01 64 3f call 4005dfd8 <== NOT EXECUTED 40004ee0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if (resolved_len >= PATH_MAX) { 40004ee4: 80 a2 20 fe cmp %o0, 0xfe <== NOT EXECUTED 40004ee8: 18 80 00 58 bgu 40005048 <== NOT EXECUTED 40004eec: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED if (lstat(resolved, &sb) != 0) { 40004ef0: 92 07 bc 98 add %fp, -872, %o1 <== NOT EXECUTED 40004ef4: 7f ff f9 6b call 400034a0 <== NOT EXECUTED 40004ef8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40004efc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004f00: 12 80 00 b7 bne 400051dc <== NOT EXECUTED 40004f04: c2 07 bc a8 ld [ %fp + -856 ], %g1 <== NOT EXECUTED if (S_ISLNK(sb.st_mode)) { 40004f08: 82 08 40 13 and %g1, %l3, %g1 <== NOT EXECUTED 40004f0c: 80 a0 40 17 cmp %g1, %l7 <== NOT EXECUTED 40004f10: 02 80 00 57 be 4000506c <== NOT EXECUTED 40004f14: 80 a5 a0 20 cmp %l6, 0x20 <== NOT EXECUTED while (left_len != 0) { 40004f18: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 40004f1c: 12 bf ff c8 bne 40004e3c <== NOT EXECUTED 40004f20: 92 10 20 2f mov 0x2f, %o1 <== NOT EXECUTED /* * Remove trailing slash except when the resolved pathname * is a single "/". */ if (resolved_len > 1 && resolved[resolved_len - 1] == '/') 40004f24: 80 a7 60 01 cmp %i5, 1 <== NOT EXECUTED 40004f28: 08 80 00 08 bleu 40004f48 <== NOT EXECUTED 40004f2c: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED 40004f30: ba 07 7f ff add %i5, -1, %i5 <== NOT EXECUTED 40004f34: c2 4e 40 1d ldsb [ %i1 + %i5 ], %g1 <== NOT EXECUTED 40004f38: 80 a0 60 2f cmp %g1, 0x2f <== NOT EXECUTED 40004f3c: 12 80 00 b6 bne 40005214 <== NOT EXECUTED 40004f40: 01 00 00 00 nop <== NOT EXECUTED resolved[resolved_len - 1] = '\0'; 40004f44: c0 2e 40 1d clrb [ %i1 + %i5 ] <== NOT EXECUTED 40004f48: 81 c7 e0 08 ret <== NOT EXECUTED 40004f4c: 81 e8 00 00 restore <== NOT EXECUTED if (getcwd(resolved, PATH_MAX) == NULL) { 40004f50: 40 01 2b dc call 4004fec0 <== NOT EXECUTED 40004f54: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40004f58: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40004f5c: 02 80 00 8a be 40005184 <== NOT EXECUTED 40004f60: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED resolved_len = strlen(resolved); 40004f64: 40 01 64 6b call 4005e110 <== NOT EXECUTED 40004f68: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED left_len = strlcpy(left, path, sizeof(left)); 40004f6c: a0 07 bd 00 add %fp, -768, %l0 <== NOT EXECUTED resolved_len = strlen(resolved); 40004f70: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED left_len = strlcpy(left, path, sizeof(left)); 40004f74: 94 10 20 ff mov 0xff, %o2 <== NOT EXECUTED 40004f78: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED 40004f7c: 40 01 64 41 call 4005e080 <== NOT EXECUTED 40004f80: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if (left_len >= sizeof(left) || resolved_len >= PATH_MAX) { 40004f84: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED 40004f88: 80 a7 60 fe cmp %i5, 0xfe <== NOT EXECUTED 40004f8c: 18 bf ff 99 bgu 40004df0 <== NOT EXECUTED 40004f90: b6 10 00 08 mov %o0, %i3 <== NOT EXECUTED 40004f94: 10 bf ff 97 b 40004df0 <== NOT EXECUTED 40004f98: 84 10 20 00 clr %g2 <== NOT EXECUTED if (lstat(resolved, &sb) != 0) { 40004f9c: 92 07 bc 98 add %fp, -872, %o1 <== NOT EXECUTED 40004fa0: 7f ff f9 40 call 400034a0 <== NOT EXECUTED 40004fa4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40004fa8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004fac: 12 80 00 8c bne 400051dc <== NOT EXECUTED 40004fb0: c2 07 bc a8 ld [ %fp + -856 ], %g1 <== NOT EXECUTED if (!S_ISDIR(sb.st_mode)) { 40004fb4: 82 08 40 13 and %g1, %l3, %g1 <== NOT EXECUTED 40004fb8: 80 a0 40 15 cmp %g1, %l5 <== NOT EXECUTED 40004fbc: 02 bf ff d8 be 40004f1c <== NOT EXECUTED 40004fc0: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED if (m) 40004fc4: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 40004fc8: 12 80 00 61 bne 4000514c <== NOT EXECUTED 40004fcc: 01 00 00 00 nop <== NOT EXECUTED errno = ENOTDIR; 40004fd0: 40 01 1c d1 call 4004c314 <__errno> <== NOT EXECUTED 40004fd4: b0 10 20 00 clr %i0 ! 0 <== NOT EXECUTED 40004fd8: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 40004fdc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return (NULL); 40004fe0: 81 c7 e0 08 ret <== NOT EXECUTED 40004fe4: 81 e8 00 00 restore <== NOT EXECUTED if (s - left >= sizeof(next_token)) { 40004fe8: 80 a6 e0 fe cmp %i3, 0xfe <== NOT EXECUTED 40004fec: 18 80 00 17 bgu 40005048 <== NOT EXECUTED 40004ff0: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED memcpy(next_token, left, s - left); 40004ff4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40004ff8: 40 01 33 72 call 40051dc0 <== NOT EXECUTED 40004ffc: 90 07 be 00 add %fp, -512, %o0 <== NOT EXECUTED next_token[s - left] = '\0'; 40005000: 82 07 80 1b add %fp, %i3, %g1 <== NOT EXECUTED left_len -= s - left; 40005004: b6 10 20 00 clr %i3 <== NOT EXECUTED next_token[s - left] = '\0'; 40005008: 10 bf ff 9f b 40004e84 <== NOT EXECUTED 4000500c: c0 28 7e 00 clrb [ %g1 + -512 ] <== NOT EXECUTED else if (strcmp(next_token, "..") == 0) { 40005010: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005014: 12 bf ff b1 bne 40004ed8 <== NOT EXECUTED 40005018: 94 10 20 ff mov 0xff, %o2 <== NOT EXECUTED if (resolved_len > 1) { 4000501c: 80 a7 60 01 cmp %i5, 1 <== NOT EXECUTED 40005020: 08 bf ff be bleu 40004f18 <== NOT EXECUTED 40005024: 92 10 20 2f mov 0x2f, %o1 <== NOT EXECUTED resolved[resolved_len - 1] = '\0'; 40005028: ba 06 40 1d add %i1, %i5, %i5 <== NOT EXECUTED 4000502c: c0 2f 7f ff clrb [ %i5 + -1 ] <== NOT EXECUTED q = strrchr(resolved, '/') + 1; 40005030: 40 01 69 64 call 4005f5c0 <== NOT EXECUTED 40005034: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40005038: ba 02 20 01 add %o0, 1, %i5 <== NOT EXECUTED *q = '\0'; 4000503c: c0 2a 20 01 clrb [ %o0 + 1 ] <== NOT EXECUTED resolved_len = q - resolved; 40005040: 10 bf ff b6 b 40004f18 <== NOT EXECUTED 40005044: ba 27 40 19 sub %i5, %i1, %i5 <== NOT EXECUTED if (m) 40005048: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 4000504c: 12 80 00 54 bne 4000519c <== NOT EXECUTED 40005050: 01 00 00 00 nop <== NOT EXECUTED errno = ENAMETOOLONG; 40005054: 40 01 1c b0 call 4004c314 <__errno> <== NOT EXECUTED 40005058: b0 10 20 00 clr %i0 ! 0 <== NOT EXECUTED 4000505c: 82 10 20 5b mov 0x5b, %g1 <== NOT EXECUTED 40005060: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return (NULL); 40005064: 81 c7 e0 08 ret <== NOT EXECUTED 40005068: 81 e8 00 00 restore <== NOT EXECUTED if (symlinks++ > MAXSYMLINKS) { 4000506c: 18 80 00 63 bgu 400051f8 <== NOT EXECUTED 40005070: b4 05 a0 01 add %l6, 1, %i2 <== NOT EXECUTED slen = readlink(resolved, symlink, sizeof(symlink) - 1); 40005074: 94 10 20 fe mov 0xfe, %o2 <== NOT EXECUTED 40005078: 92 07 bf 00 add %fp, -256, %o1 <== NOT EXECUTED 4000507c: 7f ff fe d3 call 40004bc8 <== NOT EXECUTED 40005080: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if (slen < 0) { 40005084: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED 40005088: 06 80 00 55 bl 400051dc <== NOT EXECUTED 4000508c: ac 07 80 1b add %fp, %i3, %l6 <== NOT EXECUTED symlink[slen] = '\0'; 40005090: c0 2d bf 00 clrb [ %l6 + -256 ] <== NOT EXECUTED if (symlink[0] == '/') { 40005094: c2 4f bf 00 ldsb [ %fp + -256 ], %g1 <== NOT EXECUTED 40005098: 80 a0 60 2f cmp %g1, 0x2f <== NOT EXECUTED 4000509c: 02 80 00 43 be 400051a8 <== NOT EXECUTED 400050a0: 80 a7 60 01 cmp %i5, 1 <== NOT EXECUTED } else if (resolved_len > 1) { 400050a4: 08 80 00 09 bleu 400050c8 <== NOT EXECUTED 400050a8: 92 10 20 2f mov 0x2f, %o1 <== NOT EXECUTED resolved[resolved_len - 1] = '\0'; 400050ac: ba 06 40 1d add %i1, %i5, %i5 <== NOT EXECUTED 400050b0: c0 2f 7f ff clrb [ %i5 + -1 ] <== NOT EXECUTED q = strrchr(resolved, '/') + 1; 400050b4: 40 01 69 43 call 4005f5c0 <== NOT EXECUTED 400050b8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED *q = '\0'; 400050bc: c0 2a 20 01 clrb [ %o0 + 1 ] <== NOT EXECUTED q = strrchr(resolved, '/') + 1; 400050c0: 90 02 20 01 inc %o0 <== NOT EXECUTED resolved_len = q - resolved; 400050c4: ba 22 00 19 sub %o0, %i1, %i5 <== NOT EXECUTED if (p != NULL) { 400050c8: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 400050cc: 02 80 00 12 be 40005114 <== NOT EXECUTED 400050d0: 94 10 20 ff mov 0xff, %o2 <== NOT EXECUTED if (symlink[slen - 1] != '/') { 400050d4: c2 4d be ff ldsb [ %l6 + -257 ], %g1 <== NOT EXECUTED 400050d8: 80 a0 60 2f cmp %g1, 0x2f <== NOT EXECUTED 400050dc: 02 80 00 08 be 400050fc <== NOT EXECUTED 400050e0: b6 06 e0 01 inc %i3 <== NOT EXECUTED if (slen + 1 >= sizeof(symlink)) { 400050e4: 80 a6 e0 fe cmp %i3, 0xfe <== NOT EXECUTED 400050e8: 14 bf ff d8 bg 40005048 <== NOT EXECUTED 400050ec: b6 07 80 1b add %fp, %i3, %i3 <== NOT EXECUTED symlink[slen] = '/'; 400050f0: e2 2d bf 00 stb %l1, [ %l6 + -256 ] <== NOT EXECUTED symlink[slen + 1] = 0; 400050f4: c0 2e ff 00 clrb [ %i3 + -256 ] <== NOT EXECUTED left_len = strlcat(symlink, left, 400050f8: 94 10 20 ff mov 0xff, %o2 <== NOT EXECUTED 400050fc: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40005100: 40 01 63 b6 call 4005dfd8 <== NOT EXECUTED 40005104: 90 07 bf 00 add %fp, -256, %o0 <== NOT EXECUTED if (left_len >= sizeof(left)) { 40005108: 80 a2 20 fe cmp %o0, 0xfe <== NOT EXECUTED 4000510c: 18 bf ff cf bgu 40005048 <== NOT EXECUTED 40005110: 94 10 20 ff mov 0xff, %o2 <== NOT EXECUTED left_len = strlcpy(left, symlink, sizeof(left)); 40005114: 92 07 bf 00 add %fp, -256, %o1 <== NOT EXECUTED 40005118: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000511c: 40 01 63 d9 call 4005e080 <== NOT EXECUTED 40005120: ac 10 00 1a mov %i2, %l6 <== NOT EXECUTED 40005124: 10 bf ff 7d b 40004f18 <== NOT EXECUTED 40005128: b6 10 00 08 mov %o0, %i3 <== NOT EXECUTED resolved = malloc(PATH_MAX); 4000512c: 90 10 20 ff mov 0xff, %o0 <== NOT EXECUTED 40005130: 7f ff f8 f0 call 400034f0 <== NOT EXECUTED 40005134: a8 10 20 01 mov 1, %l4 <== NOT EXECUTED if (resolved == NULL) 40005138: b2 92 20 00 orcc %o0, 0, %i1 <== NOT EXECUTED 4000513c: 32 bf ff 1c bne,a 40004dac <== NOT EXECUTED 40005140: bb 3f 60 18 sra %i5, 0x18, %i5 <== NOT EXECUTED 40005144: 81 c7 e0 08 ret <== NOT EXECUTED 40005148: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED free(resolved); 4000514c: 7f ff f5 9f call 400027c8 <== NOT EXECUTED 40005150: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED errno = ENOTDIR; 40005154: 40 01 1c 70 call 4004c314 <__errno> <== NOT EXECUTED 40005158: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000515c: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 40005160: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return (NULL); 40005164: 81 c7 e0 08 ret <== NOT EXECUTED 40005168: 81 e8 00 00 restore <== NOT EXECUTED errno = ENOENT; 4000516c: 40 01 1c 6a call 4004c314 <__errno> <== NOT EXECUTED 40005170: b0 10 20 00 clr %i0 <== NOT EXECUTED 40005174: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 40005178: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return (NULL); 4000517c: 81 c7 e0 08 ret <== NOT EXECUTED 40005180: 81 e8 00 00 restore <== NOT EXECUTED if (m) 40005184: 12 80 00 0c bne 400051b4 <== NOT EXECUTED 40005188: 82 10 20 2e mov 0x2e, %g1 <== NOT EXECUTED resolved[1] = '\0'; 4000518c: c0 2e 60 01 clrb [ %i1 + 1 ] <== NOT EXECUTED resolved[0] = '.'; 40005190: c2 2e 40 00 stb %g1, [ %i1 ] <== NOT EXECUTED resolved[1] = '\0'; 40005194: 81 c7 e0 08 ret <== NOT EXECUTED 40005198: 81 e8 00 00 restore <== NOT EXECUTED free(resolved); 4000519c: 7f ff f5 8b call 400027c8 <== NOT EXECUTED 400051a0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 400051a4: 30 bf ff ac b,a 40005054 <== NOT EXECUTED resolved[1] = 0; 400051a8: c0 2e 60 01 clrb [ %i1 + 1 ] <== NOT EXECUTED resolved_len = 1; 400051ac: 10 bf ff c7 b 400050c8 <== NOT EXECUTED 400051b0: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED free(resolved); 400051b4: 7f ff f5 85 call 400027c8 <== NOT EXECUTED 400051b8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 400051bc: 81 c7 e0 08 ret <== NOT EXECUTED 400051c0: 81 e8 00 00 restore <== NOT EXECUTED errno = EINVAL; 400051c4: 40 01 1c 54 call 4004c314 <__errno> <== NOT EXECUTED 400051c8: b0 10 20 00 clr %i0 <== NOT EXECUTED 400051cc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400051d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return (NULL); 400051d4: 81 c7 e0 08 ret <== NOT EXECUTED 400051d8: 81 e8 00 00 restore <== NOT EXECUTED if (m) 400051dc: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 400051e0: 02 bf ff 5a be 40004f48 <== NOT EXECUTED 400051e4: b0 10 20 00 clr %i0 <== NOT EXECUTED free(resolved); 400051e8: 7f ff f5 78 call 400027c8 <== NOT EXECUTED 400051ec: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 400051f0: 81 c7 e0 08 ret <== NOT EXECUTED 400051f4: 81 e8 00 00 restore <== NOT EXECUTED if (m) 400051f8: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 400051fc: 12 80 00 08 bne 4000521c <== NOT EXECUTED 40005200: 01 00 00 00 nop <== NOT EXECUTED errno = ELOOP; 40005204: 40 01 1c 44 call 4004c314 <__errno> <== NOT EXECUTED 40005208: b0 10 20 00 clr %i0 ! 0 <== NOT EXECUTED 4000520c: 82 10 20 5c mov 0x5c, %g1 <== NOT EXECUTED 40005210: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return (NULL); 40005214: 81 c7 e0 08 ret <== NOT EXECUTED 40005218: 81 e8 00 00 restore <== NOT EXECUTED free(resolved); 4000521c: 7f ff f5 6b call 400027c8 <== NOT EXECUTED 40005220: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40005224: 30 bf ff f8 b,a 40005204 <== NOT EXECUTED =============================================================================== 40001434 : const rtems_assoc_32_pair *pairs, size_t pair_count, const char *separator, const char *fallback ) { 40001434: 9d e3 bf a0 save %sp, -96, %sp size_t len; size_t i; len = 0; for ( i = 0; i < pair_count ; ++i ) { 40001438: a0 10 20 00 clr %l0 { 4000143c: a2 10 00 19 mov %i1, %l1 40001440: e4 07 a0 5c ld [ %fp + 0x5c ], %l2 for ( i = 0; i < pair_count ; ++i ) { 40001444: 80 a7 20 00 cmp %i4, 0 40001448: 02 80 00 22 be 400014d0 <== NEVER TAKEN 4000144c: b2 10 20 00 clr %i1 const rtems_assoc_32_pair *p; p = &pairs[ i ]; if ( ( value & p->bits ) != 0 ) { 40001450: c2 06 c0 00 ld [ %i3 ], %g1 40001454: 80 8e 00 01 btst %i0, %g1 40001458: 22 80 00 16 be,a 400014b0 4000145c: a0 04 20 01 inc %l0 if ( len > 0 ) { 40001460: 80 a6 60 00 cmp %i1, 0 40001464: 02 80 00 0b be 40001490 40001468: 90 10 00 11 mov %l1, %o0 if ( len < buffer_size ) { 4000146c: 80 a6 80 19 cmp %i2, %i1 len += strlcpy( &buffer[ len ], separator, space( buffer_size, len ) ); 40001470: 90 04 40 19 add %l1, %i1, %o0 if ( len < buffer_size ) { 40001474: 08 80 00 03 bleu 40001480 40001478: 94 10 20 00 clr %o2 return buffer_size - len; 4000147c: 94 26 80 19 sub %i2, %i1, %o2 len += strlcpy( &buffer[ len ], separator, space( buffer_size, len ) ); 40001480: 40 01 73 00 call 4005e080 40001484: 92 10 00 1d mov %i5, %o1 40001488: b2 06 40 08 add %i1, %o0, %i1 } len += strlcpy( &buffer[ len ], p->name, space( buffer_size, len ) ); 4000148c: 90 04 40 19 add %l1, %i1, %o0 40001490: d2 06 e0 04 ld [ %i3 + 4 ], %o1 if ( len < buffer_size ) { 40001494: 80 a6 40 1a cmp %i1, %i2 40001498: 1a 80 00 03 bcc 400014a4 4000149c: 94 10 20 00 clr %o2 return buffer_size - len; 400014a0: 94 26 80 19 sub %i2, %i1, %o2 len += strlcpy( &buffer[ len ], p->name, space( buffer_size, len ) ); 400014a4: 40 01 72 f7 call 4005e080 400014a8: a0 04 20 01 inc %l0 400014ac: b2 06 40 08 add %i1, %o0, %i1 for ( i = 0; i < pair_count ; ++i ) { 400014b0: 80 a7 00 10 cmp %i4, %l0 400014b4: 12 bf ff e7 bne 40001450 400014b8: b6 06 e0 08 add %i3, 8, %i3 } } if ( len == 0 ) { 400014bc: 80 a6 60 00 cmp %i1, 0 400014c0: 02 80 00 04 be 400014d0 400014c4: b0 10 00 19 mov %i1, %i0 len += strlcpy( buffer, fallback, buffer_size ); } return len; } 400014c8: 81 c7 e0 08 ret 400014cc: 81 e8 00 00 restore len += strlcpy( buffer, fallback, buffer_size ); 400014d0: b2 10 00 12 mov %l2, %i1 400014d4: 40 01 72 eb call 4005e080 400014d8: 91 e8 00 11 restore %g0, %l1, %o0 =============================================================================== 4000bfa8 : uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 4000bfa8: 9d e3 bf a0 save %sp, -96, %sp 4000bfac: b8 10 20 20 mov 0x20, %i4 uint32_t b; uint32_t local_value = 0; 4000bfb0: b6 10 20 00 clr %i3 for (b = 1; b; b <<= 1) { 4000bfb4: 10 80 00 04 b 4000bfc4 4000bfb8: ba 10 20 01 mov 1, %i5 4000bfbc: 02 80 00 0c be 4000bfec 4000bfc0: bb 2f 60 01 sll %i5, 1, %i5 if (b & remote_value) 4000bfc4: 80 8e 40 1d btst %i1, %i5 4000bfc8: 22 bf ff fd be,a 4000bfbc 4000bfcc: b8 87 3f ff addcc %i4, -1, %i4 local_value |= rtems_assoc_local_by_remote(ap, b); 4000bfd0: 92 10 00 1d mov %i5, %o1 4000bfd4: 40 00 00 08 call 4000bff4 4000bfd8: 90 10 00 18 mov %i0, %o0 for (b = 1; b; b <<= 1) { 4000bfdc: bb 2f 60 01 sll %i5, 1, %i5 4000bfe0: b8 87 3f ff addcc %i4, -1, %i4 4000bfe4: 12 bf ff f8 bne 4000bfc4 <== ALWAYS TAKEN 4000bfe8: b6 16 c0 08 or %i3, %o0, %i3 } return local_value; } 4000bfec: 81 c7 e0 08 ret 4000bff0: 91 e8 00 1b restore %g0, %i3, %o0 =============================================================================== 4000158c : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000158c: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 40001590: d0 06 00 00 ld [ %i0 ], %o0 40001594: 80 a2 20 00 cmp %o0, 0 40001598: 02 80 00 14 be 400015e8 4000159c: 13 10 02 0d sethi %hi(0x40083400), %o1 400015a0: 40 01 70 8a call 4005d7c8 400015a4: 92 12 63 d0 or %o1, 0x3d0, %o1 ! 400837d0 400015a8: 80 a2 20 00 cmp %o0, 0 400015ac: 12 80 00 11 bne 400015f0 400015b0: 90 10 00 18 mov %i0, %o0 default_ap = ap++; for ( ; ap->name; ap++) 400015b4: c2 06 20 0c ld [ %i0 + 0xc ], %g1 400015b8: 80 a0 60 00 cmp %g1, 0 400015bc: 12 80 00 07 bne 400015d8 <== ALWAYS TAKEN 400015c0: 90 06 20 0c add %i0, 0xc, %o0 400015c4: 10 80 00 0e b 400015fc <== NOT EXECUTED 400015c8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400015cc: 80 a0 60 00 cmp %g1, 0 400015d0: 02 80 00 0a be 400015f8 400015d4: 90 02 20 0c add %o0, 0xc, %o0 if (ap->local_value == local_value) 400015d8: c2 02 20 04 ld [ %o0 + 4 ], %g1 400015dc: 80 a0 40 19 cmp %g1, %i1 400015e0: 32 bf ff fb bne,a 400015cc 400015e4: c2 02 20 0c ld [ %o0 + 0xc ], %g1 return ap; return default_ap; } 400015e8: 81 c7 e0 08 ret 400015ec: 91 e8 00 08 restore %g0, %o0, %o0 const rtems_assoc_t *default_ap = 0; 400015f0: 10 bf ff fa b 400015d8 400015f4: b0 10 20 00 clr %i0 for ( ; ap->name; ap++) 400015f8: 90 10 00 18 mov %i0, %o0 } 400015fc: 81 c7 e0 08 ret 40001600: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 40001ed8 : const rtems_assoc_t *rtems_assoc_ptr_by_name( const rtems_assoc_t *ap, const char *name ) { 40001ed8: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 40001edc: fa 06 00 00 ld [ %i0 ], %i5 40001ee0: 80 a7 60 00 cmp %i5, 0 40001ee4: 02 80 00 18 be 40001f44 40001ee8: b8 10 20 00 clr %i4 40001eec: 90 10 00 1d mov %i5, %o0 40001ef0: 13 10 00 41 sethi %hi(0x40010400), %o1 40001ef4: 40 00 36 2d call 4000f7a8 40001ef8: 92 12 62 b8 or %o1, 0x2b8, %o1 ! 400106b8 <_rodata_start+0x7e8> 40001efc: 80 a2 20 00 cmp %o0, 0 40001f00: 32 80 00 13 bne,a 40001f4c 40001f04: b8 10 00 18 mov %i0, %i4 default_ap = ap++; for ( ; ap->name; ap++) 40001f08: fa 06 20 0c ld [ %i0 + 0xc ], %i5 40001f0c: 80 a7 60 00 cmp %i5, 0 40001f10: 12 80 00 07 bne 40001f2c <== ALWAYS TAKEN 40001f14: b8 06 20 0c add %i0, 0xc, %i4 40001f18: 10 80 00 10 b 40001f58 <== NOT EXECUTED 40001f1c: b8 10 00 18 mov %i0, %i4 <== NOT EXECUTED 40001f20: 80 a7 60 00 cmp %i5, 0 40001f24: 02 80 00 0c be 40001f54 40001f28: b8 07 20 0c add %i4, 0xc, %i4 if (strcmp(ap->name, name) == 0) 40001f2c: 90 10 00 1d mov %i5, %o0 40001f30: 40 00 36 1e call 4000f7a8 40001f34: 92 10 00 19 mov %i1, %o1 40001f38: 80 a2 20 00 cmp %o0, 0 40001f3c: 32 bf ff f9 bne,a 40001f20 40001f40: fa 07 20 0c ld [ %i4 + 0xc ], %i5 return ap; return default_ap; } 40001f44: 81 c7 e0 08 ret 40001f48: 91 e8 00 1c restore %g0, %i4, %o0 const rtems_assoc_t *default_ap = 0; 40001f4c: 10 bf ff f8 b 40001f2c 40001f50: b0 10 20 00 clr %i0 for ( ; ap->name; ap++) 40001f54: b8 10 00 18 mov %i0, %i4 } 40001f58: 81 c7 e0 08 ret 40001f5c: 91 e8 00 1c restore %g0, %i4, %o0 =============================================================================== 4000c01c : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 4000c01c: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000c020: d0 06 00 00 ld [ %i0 ], %o0 4000c024: 80 a2 20 00 cmp %o0, 0 4000c028: 02 80 00 14 be 4000c078 4000c02c: 13 10 00 5f sethi %hi(0x40017c00), %o1 4000c030: 40 00 10 fd call 40010424 4000c034: 92 12 63 c8 or %o1, 0x3c8, %o1 ! 40017fc8 4000c038: 80 a2 20 00 cmp %o0, 0 4000c03c: 12 80 00 11 bne 4000c080 4000c040: 90 10 00 18 mov %i0, %o0 default_ap = ap++; for ( ; ap->name; ap++) 4000c044: c2 06 20 0c ld [ %i0 + 0xc ], %g1 4000c048: 80 a0 60 00 cmp %g1, 0 4000c04c: 12 80 00 07 bne 4000c068 <== ALWAYS TAKEN 4000c050: 90 06 20 0c add %i0, 0xc, %o0 4000c054: 10 80 00 0e b 4000c08c <== NOT EXECUTED 4000c058: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000c05c: 80 a0 60 00 cmp %g1, 0 4000c060: 02 80 00 0a be 4000c088 4000c064: 90 02 20 0c add %o0, 0xc, %o0 if (ap->remote_value == remote_value) 4000c068: c2 02 20 08 ld [ %o0 + 8 ], %g1 4000c06c: 80 a0 40 19 cmp %g1, %i1 4000c070: 32 bf ff fb bne,a 4000c05c 4000c074: c2 02 20 0c ld [ %o0 + 0xc ], %g1 return ap; return default_ap; } 4000c078: 81 c7 e0 08 ret 4000c07c: 91 e8 00 08 restore %g0, %o0, %o0 const rtems_assoc_t *default_ap = 0; 4000c080: 10 bf ff fa b 4000c068 4000c084: b0 10 20 00 clr %i0 for ( ; ap->name; ap++) 4000c088: 90 10 00 18 mov %i0, %o0 } 4000c08c: 81 c7 e0 08 ret 4000c090: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 40001fd8 : uint32_t rtems_assoc_remote_by_local_bitfield( const rtems_assoc_t *ap, uint32_t local_value ) { 40001fd8: 9d e3 bf a0 save %sp, -96, %sp 40001fdc: b8 10 20 20 mov 0x20, %i4 uint32_t b; uint32_t remote_value = 0; 40001fe0: b6 10 20 00 clr %i3 for (b = 1; b; b <<= 1) 40001fe4: 10 80 00 04 b 40001ff4 40001fe8: ba 10 20 01 mov 1, %i5 40001fec: 02 80 00 0c be 4000201c 40001ff0: bb 2f 60 01 sll %i5, 1, %i5 if (b & local_value) 40001ff4: 80 8e 40 1d btst %i1, %i5 40001ff8: 22 bf ff fd be,a 40001fec 40001ffc: b8 87 3f ff addcc %i4, -1, %i4 remote_value |= rtems_assoc_remote_by_local(ap, b); 40002000: 92 10 00 1d mov %i5, %o1 40002004: 40 00 00 08 call 40002024 40002008: 90 10 00 18 mov %i0, %o0 for (b = 1; b; b <<= 1) 4000200c: bb 2f 60 01 sll %i5, 1, %i5 40002010: b8 87 3f ff addcc %i4, -1, %i4 40002014: 12 bf ff f8 bne 40001ff4 <== ALWAYS TAKEN 40002018: b6 16 c0 08 or %i3, %o0, %i3 return remote_value; } 4000201c: 81 c7 e0 08 ret 40002020: 91 e8 00 1b restore %g0, %i3, %o0 =============================================================================== 4000f8ec : #include #include void *rtems_cache_aligned_malloc( size_t nbytes ) { 4000f8ec: 9d e3 bf a0 save %sp, -96, %sp size_t line_size = rtems_cache_get_maximal_line_size(); 4000f8f0: 40 00 0e 77 call 400132cc 4000f8f4: 01 00 00 00 nop if ( line_size > 0 ) { 4000f8f8: b2 92 20 00 orcc %o0, 0, %i1 4000f8fc: 02 80 00 05 be 4000f910 <== NEVER TAKEN 4000f900: 84 20 00 19 neg %i1, %g2 /* Assume that the cache line size is a power of two */ size_t m = line_size - 1; nbytes = (nbytes + m) & ~m; 4000f904: b0 06 3f ff add %i0, -1, %i0 4000f908: 82 06 00 19 add %i0, %i1, %g1 4000f90c: b0 08 80 01 and %g2, %g1, %i0 } return rtems_heap_allocate_aligned_with_boundary( nbytes, line_size, 0 ); 4000f910: 7f ff d1 d8 call 40004070 4000f914: 95 e8 20 00 restore %g0, 0, %o2 =============================================================================== 40002db8 : void rtems_cache_coherent_add_area( void *area_begin, uintptr_t area_size ) { 40002db8: 9d e3 bf a0 save %sp, -96, %sp return _System_state_Current; 40002dbc: 03 10 00 5c sethi %hi(0x40017000), %g1 if ( _System_state_Is_up( _System_state_Get()) ) { 40002dc0: c2 00 62 28 ld [ %g1 + 0x228 ], %g1 ! 40017228 <_System_state_Current> 40002dc4: 80 a0 60 02 cmp %g1, 2 40002dc8: 02 80 00 0a be 40002df0 40002dcc: 3b 10 00 5c sethi %hi(0x40017000), %i5 Heap_Control *heap = cache_coherent_heap; 40002dd0: c2 07 61 80 ld [ %i5 + 0x180 ], %g1 ! 40017180 if ( heap == NULL ) { 40002dd4: 80 a0 60 00 cmp %g1, 0 40002dd8: 02 80 00 12 be 40002e20 <== NEVER TAKEN 40002ddc: b4 10 00 19 mov %i1, %i2 _Heap_Extend( heap, area_begin, area_size, 0 ); 40002de0: b6 10 20 00 clr %i3 40002de4: b2 10 00 18 mov %i0, %i1 40002de8: 40 00 0e c0 call 400068e8 <_Heap_Extend> 40002dec: 91 e8 00 01 restore %g0, %g1, %o0 _RTEMS_Lock_allocator(); 40002df0: 40 00 0c b9 call 400060d4 <_RTEMS_Lock_allocator> 40002df4: 01 00 00 00 nop Heap_Control *heap = cache_coherent_heap; 40002df8: d0 07 61 80 ld [ %i5 + 0x180 ], %o0 ok = _Heap_Initialize( heap, area_begin, area_size, 0 ); 40002dfc: 96 10 20 00 clr %o3 40002e00: 94 10 00 19 mov %i1, %o2 if ( heap == NULL ) { 40002e04: 80 a2 20 00 cmp %o0, 0 40002e08: 02 80 00 12 be 40002e50 40002e0c: 92 10 00 18 mov %i0, %o1 _Heap_Extend( heap, area_begin, area_size, 0 ); 40002e10: 40 00 0e b6 call 400068e8 <_Heap_Extend> 40002e14: 01 00 00 00 nop add_area( area_begin, area_size ); _RTEMS_Unlock_allocator(); 40002e18: 40 00 0c b4 call 400060e8 <_RTEMS_Unlock_allocator> 40002e1c: 81 e8 00 00 restore ok = _Heap_Initialize( heap, area_begin, area_size, 0 ); 40002e20: 96 10 20 00 clr %o3 <== NOT EXECUTED 40002e24: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 40002e28: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40002e2c: 39 10 00 5c sethi %hi(0x40017000), %i4 <== NOT EXECUTED 40002e30: 40 00 0d eb call 400065dc <_Heap_Initialize> <== NOT EXECUTED 40002e34: 90 17 21 88 or %i4, 0x188, %o0 ! 40017188 <== NOT EXECUTED if ( ok ) { 40002e38: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40002e3c: 02 80 00 03 be 40002e48 <== NOT EXECUTED 40002e40: b8 17 21 88 or %i4, 0x188, %i4 <== NOT EXECUTED cache_coherent_heap = heap; 40002e44: f8 27 61 80 st %i4, [ %i5 + 0x180 ] <== NOT EXECUTED 40002e48: 81 c7 e0 08 ret <== NOT EXECUTED 40002e4c: 81 e8 00 00 restore <== NOT EXECUTED ok = _Heap_Initialize( heap, area_begin, area_size, 0 ); 40002e50: 39 10 00 5c sethi %hi(0x40017000), %i4 40002e54: 40 00 0d e2 call 400065dc <_Heap_Initialize> 40002e58: 90 17 21 88 or %i4, 0x188, %o0 ! 40017188 if ( ok ) { 40002e5c: 80 a2 20 00 cmp %o0, 0 40002e60: 02 bf ff ee be 40002e18 40002e64: b8 17 21 88 or %i4, 0x188, %i4 cache_coherent_heap = heap; 40002e68: f8 27 61 80 st %i4, [ %i5 + 0x180 ] _RTEMS_Unlock_allocator(); 40002e6c: 40 00 0c 9f call 400060e8 <_RTEMS_Unlock_allocator> 40002e70: 81 e8 00 00 restore =============================================================================== 40002d5c : void rtems_cache_coherent_free( void *ptr ) { 40002d5c: 9d e3 bf a0 save %sp, -96, %sp Heap_Control *heap; _RTEMS_Lock_allocator(); 40002d60: 40 00 0c dd call 400060d4 <_RTEMS_Lock_allocator> 40002d64: 01 00 00 00 nop heap = cache_coherent_heap; 40002d68: 03 10 00 5c sethi %hi(0x40017000), %g1 40002d6c: d0 00 61 80 ld [ %g1 + 0x180 ], %o0 ! 40017180 if ( heap != NULL ) { 40002d70: 80 a2 20 00 cmp %o0, 0 40002d74: 02 80 00 09 be 40002d98 40002d78: 03 10 00 5c sethi %hi(0x40017000), %g1 if ( _Heap_Free( heap, ptr ) ) { 40002d7c: 40 00 0f c0 call 40006c7c <_Heap_Free> 40002d80: 92 10 00 18 mov %i0, %o1 40002d84: 80 a2 20 00 cmp %o0, 0 40002d88: 02 80 00 04 be 40002d98 40002d8c: 03 10 00 5c sethi %hi(0x40017000), %g1 if ( heap != NULL ) { _Heap_Free( heap, ptr ); } _RTEMS_Unlock_allocator(); 40002d90: 40 00 0c d6 call 400060e8 <_RTEMS_Unlock_allocator> 40002d94: 81 e8 00 00 restore heap = RTEMS_Malloc_Heap; 40002d98: d0 00 61 f4 ld [ %g1 + 0x1f4 ], %o0 if ( heap != NULL ) { 40002d9c: 80 a2 20 00 cmp %o0, 0 40002da0: 02 bf ff fc be 40002d90 <== NEVER TAKEN 40002da4: 01 00 00 00 nop _Heap_Free( heap, ptr ); 40002da8: 40 00 0f b5 call 40006c7c <_Heap_Free> 40002dac: 92 10 00 18 mov %i0, %o1 _RTEMS_Unlock_allocator(); 40002db0: 40 00 0c ce call 400060e8 <_RTEMS_Unlock_allocator> 40002db4: 81 e8 00 00 restore =============================================================================== 40001cec : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 40001cec: 9d e3 bf 98 save %sp, -104, %sp va_list arglist; int chars_written; va_start(arglist, printf_format); 40001cf0: 94 07 a0 4c add %fp, 0x4c, %o2 40001cf4: f4 27 a0 4c st %i2, [ %fp + 0x4c ] chars_written = rtems_verror(error_flag, printf_format, arglist); 40001cf8: 92 10 00 19 mov %i1, %o1 va_start(arglist, printf_format); 40001cfc: f6 27 a0 50 st %i3, [ %fp + 0x50 ] chars_written = rtems_verror(error_flag, printf_format, arglist); 40001d00: 90 10 00 18 mov %i0, %o0 va_start(arglist, printf_format); 40001d04: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40001d08: fa 27 a0 58 st %i5, [ %fp + 0x58 ] chars_written = rtems_verror(error_flag, printf_format, arglist); 40001d0c: 7f ff ff 86 call 40001b24 40001d10: d4 27 bf fc st %o2, [ %fp + -4 ] va_end(arglist); if (error_flag & RTEMS_ERROR_PANIC) { 40001d14: 03 08 00 00 sethi %hi(0x20000000), %g1 40001d18: 80 8e 00 01 btst %i0, %g1 40001d1c: 12 80 00 07 bne 40001d38 40001d20: 03 04 00 00 sethi %hi(0x10000000), %g1 rtems_error(0, "fatal error, exiting"); _exit(errno); } if (error_flag & RTEMS_ERROR_ABORT) { 40001d24: 80 8e 00 01 btst %i0, %g1 40001d28: 12 80 00 0c bne 40001d58 40001d2c: b0 10 00 08 mov %o0, %i0 rtems_error(0, "fatal error, aborting"); abort(); } return chars_written; } 40001d30: 81 c7 e0 08 ret 40001d34: 81 e8 00 00 restore rtems_error(0, "fatal error, exiting"); 40001d38: 13 10 02 0e sethi %hi(0x40083800), %o1 40001d3c: 92 12 61 98 or %o1, 0x198, %o1 ! 40083998 40001d40: 7f ff ff eb call 40001cec 40001d44: 90 10 20 00 clr %o0 _exit(errno); 40001d48: 40 01 29 73 call 4004c314 <__errno> 40001d4c: 01 00 00 00 nop 40001d50: 40 00 07 ed call 40003d04 <_exit> 40001d54: d0 02 00 00 ld [ %o0 ], %o0 rtems_error(0, "fatal error, aborting"); 40001d58: 13 10 02 0e sethi %hi(0x40083800), %o1 40001d5c: 92 12 61 b0 or %o1, 0x1b0, %o1 ! 400839b0 40001d60: 7f ff ff e3 call 40001cec 40001d64: 90 10 20 00 clr %o0 abort(); 40001d68: 40 01 23 69 call 4004ab0c 40001d6c: 01 00 00 00 nop 40001d70: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 4000278c : } void rtems_filesystem_do_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 4000278c: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_lock(); 40002790: 40 00 12 51 call 400070d4 40002794: 01 00 00 00 nop next = the_node->next; 40002798: c4 06 00 00 ld [ %i0 ], %g2 previous = the_node->previous; 4000279c: c2 06 20 04 ld [ %i0 + 4 ], %g1 next->previous = previous; 400027a0: c2 20 a0 04 st %g1, [ %g2 + 4 ] rtems_libio_unlock(); 400027a4: 40 00 12 51 call 400070e8 400027a8: c4 20 40 00 st %g2, [ %g1 ] release_with_count(global_loc, 1); 400027ac: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 400027b0: 40 00 00 14 call 40002800 400027b4: 92 10 20 01 mov 1, %o1 rtems_filesystem_mt_lock(); rtems_chain_extract_unprotected(&mt_entry->mt_node); rtems_filesystem_mt_unlock(); rtems_filesystem_global_location_release(mt_entry->mt_point_node, false); (*mt_entry->ops->fsunmount_me_h)(mt_entry); 400027b8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 400027bc: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 400027c0: 9f c0 40 00 call %g1 400027c4: 90 10 00 18 mov %i0, %o0 if (mt_entry->unmount_task != 0) { 400027c8: d0 06 20 3c ld [ %i0 + 0x3c ], %o0 400027cc: 80 a2 20 00 cmp %o0, 0 400027d0: 02 80 00 07 be 400027ec <== NEVER TAKEN 400027d4: 01 00 00 00 nop * * @param id is the identifier of the task to receive the transient event. */ static inline rtems_status_code rtems_event_transient_send( rtems_id id ) { return rtems_event_system_send( id, RTEMS_EVENT_SYSTEM_TRANSIENT ); 400027d8: 40 00 07 e3 call 40004764 400027dc: 13 20 00 00 sethi %hi(0x80000000), %o1 rtems_status_code sc = rtems_event_transient_send(mt_entry->unmount_task); if (sc != RTEMS_SUCCESSFUL) { 400027e0: 80 a2 20 00 cmp %o0, 0 400027e4: 32 80 00 04 bne,a 400027f4 <== NEVER TAKEN 400027e8: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0 <== NOT EXECUTED rtems_fatal_error_occurred(0xdeadbeef); } } free(mt_entry); 400027ec: 40 00 11 c5 call 40006f00 400027f0: 81 e8 00 00 restore rtems_fatal_error_occurred(0xdeadbeef); 400027f4: 40 00 08 43 call 40004900 <== NOT EXECUTED 400027f8: 90 12 22 ef or %o0, 0x2ef, %o0 <== NOT EXECUTED 400027fc: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 400021f0 : { 400021f0: 9d e3 bf a0 save %sp, -96, %sp while (ctx->pathlen > 0) { 400021f4: c2 06 20 04 ld [ %i0 + 4 ], %g1 400021f8: 80 a0 60 00 cmp %g1, 0 400021fc: 22 80 00 0c be,a 4000222c 40002200: c2 06 20 0c ld [ %i0 + 0xc ], %g1 (*ctx->currentloc.mt_entry->ops->eval_path_h)(ctx); 40002204: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 40002208: c2 00 60 0c ld [ %g1 + 0xc ], %g1 4000220c: c2 00 60 08 ld [ %g1 + 8 ], %g1 40002210: 9f c0 40 00 call %g1 40002214: 90 10 00 18 mov %i0, %o0 while (ctx->pathlen > 0) { 40002218: c2 06 20 04 ld [ %i0 + 4 ], %g1 4000221c: 80 a0 60 00 cmp %g1, 0 40002220: 32 bf ff fa bne,a 40002208 40002224: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 if (rtems_filesystem_eval_path_has_token(ctx)) { 40002228: c2 06 20 0c ld [ %i0 + 0xc ], %g1 4000222c: 80 a0 60 00 cmp %g1, 0 40002230: 02 80 00 07 be 4000224c 40002234: f2 06 20 10 ld [ %i0 + 0x10 ], %i1 if (make) { 40002238: 80 8e 60 20 btst 0x20, %i1 4000223c: 22 80 00 17 be,a 40002298 40002240: c0 26 00 00 clr [ %i0 ] check_access(ctx, RTEMS_FS_PERMS_WRITE); 40002244: 7f ff ff a2 call 400020cc 40002248: 93 e8 20 02 restore %g0, 2, %o1 if (!exclusive) { 4000224c: 80 8e 60 40 btst 0x40, %i1 40002250: 32 80 00 04 bne,a 40002260 40002254: c0 26 00 00 clr [ %i0 ] check_access(ctx, ctx->flags); 40002258: 7f ff ff 9d call 400020cc 4000225c: 81 e8 00 00 restore if (!rtems_filesystem_location_is_null(&ctx->currentloc)) { 40002260: 03 10 00 5e sethi %hi(0x40017800), %g1 ctx->pathlen = 0; 40002264: c0 26 20 04 clr [ %i0 + 4 ] if (!rtems_filesystem_location_is_null(&ctx->currentloc)) { 40002268: 82 10 63 c4 or %g1, 0x3c4, %g1 ctx->token = NULL; 4000226c: c0 26 20 08 clr [ %i0 + 8 ] if (!rtems_filesystem_location_is_null(&ctx->currentloc)) { 40002270: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 40002274: 80 a0 80 01 cmp %g2, %g1 40002278: 02 80 00 17 be 400022d4 4000227c: 01 00 00 00 nop errno = eno; 40002280: 40 00 36 5f call 4000fbfc <__errno> 40002284: b0 06 20 18 add %i0, 0x18, %i0 40002288: 82 10 20 11 mov 0x11, %g1 4000228c: c2 22 00 00 st %g1, [ %o0 ] rtems_filesystem_location_detach(&ctx->currentloc); 40002290: 40 00 01 0d call 400026c4 40002294: 81 e8 00 00 restore if (!rtems_filesystem_location_is_null(&ctx->currentloc)) { 40002298: 03 10 00 5e sethi %hi(0x40017800), %g1 ctx->pathlen = 0; 4000229c: c0 26 20 04 clr [ %i0 + 4 ] if (!rtems_filesystem_location_is_null(&ctx->currentloc)) { 400022a0: 82 10 63 c4 or %g1, 0x3c4, %g1 ctx->token = NULL; 400022a4: c0 26 20 08 clr [ %i0 + 8 ] ctx->tokenlen = 0; 400022a8: c0 26 20 0c clr [ %i0 + 0xc ] if (!rtems_filesystem_location_is_null(&ctx->currentloc)) { 400022ac: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 400022b0: 80 a0 80 01 cmp %g2, %g1 400022b4: 02 80 00 08 be 400022d4 <== NEVER TAKEN 400022b8: 01 00 00 00 nop errno = eno; 400022bc: 40 00 36 50 call 4000fbfc <__errno> 400022c0: b0 06 20 18 add %i0, 0x18, %i0 400022c4: 82 10 20 02 mov 2, %g1 400022c8: c2 22 00 00 st %g1, [ %o0 ] rtems_filesystem_location_detach(&ctx->currentloc); 400022cc: 40 00 00 fe call 400026c4 400022d0: 81 e8 00 00 restore } 400022d4: 81 c7 e0 08 ret 400022d8: 81 e8 00 00 restore =============================================================================== 40007688 : void rtems_filesystem_eval_path_eat_delimiter( rtems_filesystem_eval_path_context_t *ctx ) { const char *current = ctx->path; 40007688: c2 02 00 00 ld [ %o0 ], %g1 const char *end = current + ctx->pathlen; 4000768c: c6 02 20 04 ld [ %o0 + 4 ], %g3 40007690: 86 00 40 03 add %g1, %g3, %g3 while (current != end && rtems_filesystem_is_delimiter(*current)) { 40007694: 80 a0 40 03 cmp %g1, %g3 40007698: 32 80 00 09 bne,a 400076bc <== ALWAYS TAKEN 4000769c: c4 48 40 00 ldsb [ %g1 ], %g2 ++current; } ctx->path = current; ctx->pathlen = (size_t) (end - current); 400076a0: 10 80 00 10 b 400076e0 <== NOT EXECUTED 400076a4: 86 10 20 00 clr %g3 <== NOT EXECUTED ++current; 400076a8: 82 00 60 01 inc %g1 while (current != end && rtems_filesystem_is_delimiter(*current)) { 400076ac: 80 a0 c0 01 cmp %g3, %g1 400076b0: 22 80 00 0c be,a 400076e0 400076b4: 86 10 20 00 clr %g3 return c == '/' || c == '\\'; 400076b8: c4 48 40 00 ldsb [ %g1 ], %g2 400076bc: 80 a0 a0 2f cmp %g2, 0x2f 400076c0: 02 bf ff fa be 400076a8 400076c4: 80 a0 a0 5c cmp %g2, 0x5c 400076c8: 22 bf ff f9 be,a 400076ac 400076cc: 82 00 60 01 inc %g1 ctx->pathlen = (size_t) (end - current); 400076d0: 86 20 c0 01 sub %g3, %g1, %g3 ctx->path = current; 400076d4: c2 22 00 00 st %g1, [ %o0 ] } 400076d8: 81 c3 e0 08 retl 400076dc: c6 22 20 04 st %g3, [ %o0 + 4 ] ctx->path = current; 400076e0: c2 22 00 00 st %g1, [ %o0 ] } 400076e4: 81 c3 e0 08 retl 400076e8: c6 22 20 04 st %g3, [ %o0 + 4 ] =============================================================================== 40007464 : void rtems_filesystem_eval_path_generic( rtems_filesystem_eval_path_context_t *ctx, void *arg, const rtems_filesystem_eval_path_generic_config *config ) { 40007464: 9d e3 bf a0 save %sp, -96, %sp } else { /* This is the root file system */ status = (*config->eval_token)(ctx, arg, ".", 1); } } else { status = (*config->eval_token)(ctx, arg, "..", 2); 40007468: 37 10 00 5f sethi %hi(0x40017c00), %i3 status = (*config->eval_token)(ctx, arg, ".", 1); 4000746c: 39 10 00 5f sethi %hi(0x40017c00), %i4 return &ctx->currentloc; 40007470: a0 06 20 18 add %i0, 0x18, %l0 status = (*config->eval_token)(ctx, arg, "..", 2); 40007474: b6 16 e2 00 or %i3, 0x200, %i3 status = (*config->eval_token)(ctx, arg, ".", 1); 40007478: b8 17 21 f8 or %i4, 0x1f8, %i4 rtems_filesystem_eval_path_next_token(ctx); 4000747c: 40 00 00 9c call 400076ec 40007480: 90 10 00 18 mov %i0, %o0 *tokenlen = ctx->tokenlen; 40007484: fa 06 20 0c ld [ %i0 + 0xc ], %i5 if (tokenlen > 0) { 40007488: 80 a7 60 00 cmp %i5, 0 4000748c: 02 80 00 1d be 40007500 40007490: e2 06 20 08 ld [ %i0 + 8 ], %l1 if ((*config->is_directory)(ctx, arg)) { 40007494: c2 06 80 00 ld [ %i2 ], %g1 40007498: 92 10 00 19 mov %i1, %o1 4000749c: 9f c0 40 00 call %g1 400074a0: 90 10 00 18 mov %i0, %o0 400074a4: 80 a2 20 00 cmp %o0, 0 400074a8: 02 80 00 76 be 40007680 400074ac: 80 a7 60 01 cmp %i5, 1 return tokenlen == 1 && token [0] == '.'; 400074b0: 02 80 00 16 be 40007508 400074b4: 80 a7 60 02 cmp %i5, 2 return tokenlen == 2 && token [0] == '.' && token [1] == '.'; 400074b8: 32 80 00 07 bne,a 400074d4 400074bc: c2 06 a0 04 ld [ %i2 + 4 ], %g1 400074c0: c2 4c 40 00 ldsb [ %l1 ], %g1 400074c4: 80 a0 60 2e cmp %g1, 0x2e 400074c8: 22 80 00 39 be,a 400075ac 400074cc: c2 4c 60 01 ldsb [ %l1 + 1 ], %g1 } } else { status = (*config->eval_token)(ctx, arg, token, tokenlen); 400074d0: c2 06 a0 04 ld [ %i2 + 4 ], %g1 400074d4: 96 10 00 1d mov %i5, %o3 400074d8: 94 10 00 11 mov %l1, %o2 400074dc: 92 10 00 19 mov %i1, %o1 400074e0: 9f c0 40 00 call %g1 400074e4: 90 10 00 18 mov %i0, %o0 } if (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY) { 400074e8: 80 a2 20 02 cmp %o0, 2 400074ec: 22 80 00 1d be,a 40007560 400074f0: c2 06 20 04 ld [ %i0 + 4 ], %g1 while (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE) { 400074f4: 80 a2 20 00 cmp %o0, 0 400074f8: 02 bf ff e1 be 4000747c 400074fc: 01 00 00 00 nop 40007500: 81 c7 e0 08 ret 40007504: 81 e8 00 00 restore return tokenlen == 1 && token [0] == '.'; 40007508: c2 4c 40 00 ldsb [ %l1 ], %g1 4000750c: 80 a0 60 2e cmp %g1, 0x2e 40007510: 32 bf ff f1 bne,a 400074d4 40007514: c2 06 a0 04 ld [ %i2 + 4 ], %g1 if (rtems_filesystem_eval_path_has_path(ctx)) { 40007518: c2 06 20 04 ld [ %i0 + 4 ], %g1 4000751c: 80 a0 60 00 cmp %g1, 0 40007520: 32 80 00 07 bne,a 4000753c 40007524: c2 06 a0 04 ld [ %i2 + 4 ], %g1 if ((eval_flags & RTEMS_FS_REJECT_TERMINAL_DOT) == 0) { 40007528: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 4000752c: 80 88 61 00 btst 0x100, %g1 40007530: 12 80 00 1d bne 400075a4 40007534: 01 00 00 00 nop status = (*config->eval_token)(ctx, arg, ".", 1); 40007538: c2 06 a0 04 ld [ %i2 + 4 ], %g1 4000753c: 96 10 20 01 mov 1, %o3 40007540: 94 10 00 1c mov %i4, %o2 40007544: 92 10 00 19 mov %i1, %o1 40007548: 9f c0 40 00 call %g1 4000754c: 90 10 00 18 mov %i0, %o0 if (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY) { 40007550: 80 a2 20 02 cmp %o0, 2 40007554: 12 bf ff e9 bne 400074f8 <== ALWAYS TAKEN 40007558: 80 a2 20 00 cmp %o0, 0 if (rtems_filesystem_eval_path_has_path(ctx)) { 4000755c: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 40007560: 80 a0 60 00 cmp %g1, 0 40007564: 12 80 00 04 bne 40007574 40007568: 01 00 00 00 nop } } else { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE; } } } 4000756c: 81 c7 e0 08 ret 40007570: 81 e8 00 00 restore rtems_filesystem_eval_path_eat_delimiter(ctx); 40007574: 40 00 00 45 call 40007688 40007578: 90 10 00 18 mov %i0, %o0 (eval_flags & RTEMS_FS_ACCEPT_RESIDUAL_DELIMITERS) == 0 4000757c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 if ( 40007580: 80 88 60 80 btst 0x80, %g1 40007584: 02 80 00 06 be 4000759c 40007588: 01 00 00 00 nop || rtems_filesystem_eval_path_has_path(ctx) 4000758c: c2 06 20 04 ld [ %i0 + 4 ], %g1 40007590: 80 a0 60 00 cmp %g1, 0 40007594: 02 bf ff f6 be 4000756c 40007598: 01 00 00 00 nop rtems_filesystem_eval_path_error(ctx, ENOENT); 4000759c: 7f ff eb af call 40002458 400075a0: 93 e8 20 02 restore %g0, 2, %o1 rtems_filesystem_eval_path_error(ctx, EINVAL); 400075a4: 7f ff eb ad call 40002458 400075a8: 93 e8 20 16 restore %g0, 0x16, %o1 return tokenlen == 2 && token [0] == '.' && token [1] == '.'; 400075ac: 80 a0 60 2e cmp %g1, 0x2e 400075b0: 32 bf ff c9 bne,a 400074d4 <== NEVER TAKEN 400075b4: c2 06 a0 04 ld [ %i2 + 4 ], %g1 <== NOT EXECUTED const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; 400075b8: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 400075bc: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 && (*mt_entry->ops->are_nodes_equal_h)( loc, rootloc ); 400075c0: c6 00 60 0c ld [ %g1 + 0xc ], %g3 400075c4: c4 02 60 14 ld [ %o1 + 0x14 ], %g2 400075c8: 80 a0 40 02 cmp %g1, %g2 400075cc: 02 80 00 17 be 40007628 400075d0: c6 00 e0 10 ld [ %g3 + 0x10 ], %g3 return (*mt_entry->ops->are_nodes_equal_h)( loc, mt_fs_root ); 400075d4: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 400075d8: 9f c0 c0 00 call %g3 400075dc: 90 10 00 10 mov %l0, %o0 } else if (is_fs_root(currentloc)) { 400075e0: 80 a2 20 00 cmp %o0, 0 400075e4: 22 80 00 20 be,a 40007664 400075e8: c2 06 a0 04 ld [ %i2 + 4 ], %g1 if (currentloc->mt_entry->mt_point_node != NULL) { 400075ec: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 400075f0: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 400075f4: 80 a0 a0 00 cmp %g2, 0 400075f8: 22 bf ff d1 be,a 4000753c <== NEVER TAKEN 400075fc: c2 06 a0 04 ld [ %i2 + 4 ], %g1 <== NOT EXECUTED size_t tokenlen = ctx->tokenlen; 40007600: c8 06 20 0c ld [ %i0 + 0xc ], %g4 ctx->path -= tokenlen; 40007604: c6 06 00 00 ld [ %i0 ], %g3 ctx->pathlen += tokenlen; 40007608: c4 06 20 04 ld [ %i0 + 4 ], %g2 ctx->path -= tokenlen; 4000760c: 86 20 c0 04 sub %g3, %g4, %g3 ctx->pathlen += tokenlen; 40007610: 84 00 80 04 add %g2, %g4, %g2 ctx->path -= tokenlen; 40007614: c6 26 00 00 st %g3, [ %i0 ] ctx->pathlen += tokenlen; 40007618: c4 26 20 04 st %g2, [ %i0 + 4 ] ctx->tokenlen = 0; 4000761c: c0 26 20 0c clr [ %i0 + 0xc ] rtems_filesystem_eval_path_restart( 40007620: 7f ff eb b3 call 400024ec 40007624: 93 e8 60 20 restore %g1, 0x20, %o1 && (*mt_entry->ops->are_nodes_equal_h)( loc, rootloc ); 40007628: 9f c0 c0 00 call %g3 4000762c: 90 10 00 10 mov %l0, %o0 40007630: 80 a2 20 00 cmp %o0, 0 40007634: 32 bf ff c2 bne,a 4000753c 40007638: c2 06 a0 04 ld [ %i2 + 4 ], %g1 const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; 4000763c: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 return (*mt_entry->ops->are_nodes_equal_h)( loc, mt_fs_root ); 40007640: c4 00 60 0c ld [ %g1 + 0xc ], %g2 40007644: c6 00 a0 10 ld [ %g2 + 0x10 ], %g3 40007648: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 4000764c: 9f c0 c0 00 call %g3 40007650: 90 10 00 10 mov %l0, %o0 } else if (is_fs_root(currentloc)) { 40007654: 80 a2 20 00 cmp %o0, 0 40007658: 32 bf ff e6 bne,a 400075f0 <== NEVER TAKEN 4000765c: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 <== NOT EXECUTED status = (*config->eval_token)(ctx, arg, "..", 2); 40007660: c2 06 a0 04 ld [ %i2 + 4 ], %g1 40007664: 96 10 20 02 mov 2, %o3 40007668: 94 10 00 1b mov %i3, %o2 4000766c: 92 10 00 19 mov %i1, %o1 40007670: 9f c0 40 00 call %g1 40007674: 90 10 00 18 mov %i0, %o0 if (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY) { 40007678: 10 bf ff 9d b 400074ec 4000767c: 80 a2 20 02 cmp %o0, 2 rtems_filesystem_eval_path_error(ctx, ENOTDIR); 40007680: 7f ff eb 76 call 40002458 40007684: 93 e8 20 14 restore %g0, 0x14, %o1 =============================================================================== 400076ec : const char *current = ctx->path; 400076ec: c2 02 00 00 ld [ %o0 ], %g1 const char *end = current + ctx->pathlen; 400076f0: c8 02 20 04 ld [ %o0 + 4 ], %g4 400076f4: 88 00 40 04 add %g1, %g4, %g4 while (current != end && rtems_filesystem_is_delimiter(*current)) { 400076f8: 80 a0 40 04 cmp %g1, %g4 400076fc: 32 80 00 09 bne,a 40007720 40007700: c4 48 40 00 ldsb [ %g1 ], %g2 while (current != end && !rtems_filesystem_is_delimiter(*current)) { ++current; } ctx->path = current; ctx->pathlen = (size_t) (end - current); 40007704: 10 80 00 22 b 4000778c 40007708: 86 10 20 00 clr %g3 ++current; 4000770c: 82 00 60 01 inc %g1 while (current != end && rtems_filesystem_is_delimiter(*current)) { 40007710: 80 a1 00 01 cmp %g4, %g1 40007714: 02 80 00 1e be 4000778c 40007718: 86 10 20 00 clr %g3 4000771c: c4 48 40 00 ldsb [ %g1 ], %g2 40007720: 80 a0 a0 2f cmp %g2, 0x2f 40007724: 02 bf ff fa be 4000770c 40007728: 80 a0 a0 5c cmp %g2, 0x5c 4000772c: 22 bf ff f9 be,a 40007710 40007730: 82 00 60 01 inc %g1 ctx->pathlen = (size_t) (end - current); 40007734: 9a 21 00 01 sub %g4, %g1, %o5 ctx->path = current; 40007738: c2 22 00 00 st %g1, [ %o0 ] while (current != end && !rtems_filesystem_is_delimiter(*current)) { 4000773c: 84 10 00 01 mov %g1, %g2 40007740: 80 a1 00 01 cmp %g4, %g1 40007744: 02 80 00 21 be 400077c8 <== NEVER TAKEN 40007748: da 22 20 04 st %o5, [ %o0 + 4 ] 4000774c: c6 48 80 00 ldsb [ %g2 ], %g3 40007750: 80 a0 e0 2f cmp %g3, 0x2f 40007754: 02 80 00 15 be 400077a8 40007758: 80 a0 e0 5c cmp %g3, 0x5c 4000775c: 02 80 00 14 be 400077ac 40007760: 86 21 00 02 sub %g4, %g2, %g3 ++current; 40007764: 84 00 a0 01 inc %g2 while (current != end && !rtems_filesystem_is_delimiter(*current)) { 40007768: 80 a0 80 04 cmp %g2, %g4 4000776c: 32 bf ff f9 bne,a 40007750 40007770: c6 48 80 00 ldsb [ %g2 ], %g3 40007774: 86 10 20 00 clr %g3 ctx->path = current; 40007778: c8 22 00 00 st %g4, [ %o0 ] ctx->pathlen = (size_t) (end - current); 4000777c: c6 22 20 04 st %g3, [ %o0 + 4 ] ctx->token = begin; 40007780: c2 22 20 08 st %g1, [ %o0 + 8 ] rtems_filesystem_eval_path_context_t *ctx ) { rtems_filesystem_eval_path_eat_delimiter(ctx); next_token(ctx); } 40007784: 81 c3 e0 08 retl 40007788: da 22 20 0c st %o5, [ %o0 + 0xc ] ctx->tokenlen = (size_t) (current - begin); 4000778c: 88 10 00 01 mov %g1, %g4 40007790: 9a 10 20 00 clr %o5 ctx->path = current; 40007794: c8 22 00 00 st %g4, [ %o0 ] ctx->pathlen = (size_t) (end - current); 40007798: c6 22 20 04 st %g3, [ %o0 + 4 ] ctx->token = begin; 4000779c: c2 22 20 08 st %g1, [ %o0 + 8 ] } 400077a0: 81 c3 e0 08 retl 400077a4: da 22 20 0c st %o5, [ %o0 + 0xc ] ctx->pathlen = (size_t) (end - current); 400077a8: 86 21 00 02 sub %g4, %g2, %g3 ctx->tokenlen = (size_t) (current - begin); 400077ac: 9a 20 80 01 sub %g2, %g1, %o5 400077b0: 88 10 00 02 mov %g2, %g4 ctx->pathlen = (size_t) (end - current); 400077b4: c6 22 20 04 st %g3, [ %o0 + 4 ] ctx->path = current; 400077b8: c8 22 00 00 st %g4, [ %o0 ] ctx->token = begin; 400077bc: c2 22 20 08 st %g1, [ %o0 + 8 ] } 400077c0: 81 c3 e0 08 retl 400077c4: da 22 20 0c st %o5, [ %o0 + 0xc ] while (current != end && !rtems_filesystem_is_delimiter(*current)) { 400077c8: 86 10 00 0d mov %o5, %g3 <== NOT EXECUTED 400077cc: 10 bf ff f2 b 40007794 <== NOT EXECUTED 400077d0: 9a 10 20 00 clr %o5 <== NOT EXECUTED =============================================================================== 40002550 : { 40002550: 9d e3 bf a0 save %sp, -96, %sp if (pathlen > 0) { 40002554: 80 a6 a0 00 cmp %i2, 0 40002558: 22 80 00 33 be,a 40002624 <== NEVER TAKEN 4000255c: c0 26 00 00 clr [ %i0 ] <== NOT EXECUTED if (ctx->recursionlevel < RTEMS_FILESYSTEM_SYMLOOP_MAX) { 40002560: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40002564: 80 a0 60 1f cmp %g1, 0x1f 40002568: 34 80 00 1e bg,a 400025e0 4000256c: c0 26 00 00 clr [ %i0 ] return c == '/' || c == '\\'; 40002570: c4 4e 40 00 ldsb [ %i1 ], %g2 const char *saved_path = ctx->path; 40002574: f8 06 00 00 ld [ %i0 ], %i4 if (rtems_filesystem_is_delimiter(path [0])) { 40002578: 80 a0 a0 2f cmp %g2, 0x2f 4000257c: 02 80 00 39 be 40002660 40002580: fa 06 20 04 ld [ %i0 + 4 ], %i5 40002584: 80 a0 a0 5c cmp %g2, 0x5c 40002588: 02 80 00 37 be 40002664 <== NEVER TAKEN 4000258c: 92 06 20 30 add %i0, 0x30, %o1 ++ctx->recursionlevel; 40002590: 82 00 60 01 inc %g1 ctx->path = path; 40002594: f2 26 00 00 st %i1, [ %i0 ] ctx->pathlen = pathlen; 40002598: f4 26 20 04 st %i2, [ %i0 + 4 ] ++ctx->recursionlevel; 4000259c: c2 26 20 14 st %g1, [ %i0 + 0x14 ] (*ctx->currentloc.mt_entry->ops->eval_path_h)(ctx); 400025a0: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 400025a4: c2 00 60 0c ld [ %g1 + 0xc ], %g1 400025a8: c2 00 60 08 ld [ %g1 + 8 ], %g1 400025ac: 9f c0 40 00 call %g1 400025b0: 90 10 00 18 mov %i0, %o0 while (ctx->pathlen > 0) { 400025b4: c2 06 20 04 ld [ %i0 + 4 ], %g1 400025b8: 80 a0 60 00 cmp %g1, 0 400025bc: 32 bf ff fa bne,a 400025a4 400025c0: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 --ctx->recursionlevel; 400025c4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 400025c8: 82 00 7f ff add %g1, -1, %g1 ctx->path = saved_path; 400025cc: f8 26 00 00 st %i4, [ %i0 ] --ctx->recursionlevel; 400025d0: c2 26 20 14 st %g1, [ %i0 + 0x14 ] ctx->pathlen = saved_pathlen; 400025d4: fa 26 20 04 st %i5, [ %i0 + 4 ] 400025d8: 81 c7 e0 08 ret 400025dc: 81 e8 00 00 restore if (!rtems_filesystem_location_is_null(&ctx->currentloc)) { 400025e0: 03 10 00 5e sethi %hi(0x40017800), %g1 ctx->pathlen = 0; 400025e4: c0 26 20 04 clr [ %i0 + 4 ] if (!rtems_filesystem_location_is_null(&ctx->currentloc)) { 400025e8: 82 10 63 c4 or %g1, 0x3c4, %g1 ctx->token = NULL; 400025ec: c0 26 20 08 clr [ %i0 + 8 ] ctx->tokenlen = 0; 400025f0: c0 26 20 0c clr [ %i0 + 0xc ] if (!rtems_filesystem_location_is_null(&ctx->currentloc)) { 400025f4: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 400025f8: 80 a0 80 01 cmp %g2, %g1 400025fc: 02 80 00 08 be 4000261c <== NEVER TAKEN 40002600: 01 00 00 00 nop errno = eno; 40002604: 40 00 35 7e call 4000fbfc <__errno> 40002608: b0 06 20 18 add %i0, 0x18, %i0 4000260c: 82 10 20 5c mov 0x5c, %g1 40002610: c2 22 00 00 st %g1, [ %o0 ] rtems_filesystem_location_detach(&ctx->currentloc); 40002614: 40 00 00 2c call 400026c4 40002618: 81 e8 00 00 restore } 4000261c: 81 c7 e0 08 ret <== NOT EXECUTED 40002620: 81 e8 00 00 restore <== NOT EXECUTED if (!rtems_filesystem_location_is_null(&ctx->currentloc)) { 40002624: 03 10 00 5e sethi %hi(0x40017800), %g1 <== NOT EXECUTED ctx->pathlen = 0; 40002628: c0 26 20 04 clr [ %i0 + 4 ] <== NOT EXECUTED if (!rtems_filesystem_location_is_null(&ctx->currentloc)) { 4000262c: 82 10 63 c4 or %g1, 0x3c4, %g1 <== NOT EXECUTED ctx->token = NULL; 40002630: c0 26 20 08 clr [ %i0 + 8 ] <== NOT EXECUTED ctx->tokenlen = 0; 40002634: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED if (!rtems_filesystem_location_is_null(&ctx->currentloc)) { 40002638: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 <== NOT EXECUTED 4000263c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40002640: 02 bf ff f7 be 4000261c <== NOT EXECUTED 40002644: 01 00 00 00 nop <== NOT EXECUTED errno = eno; 40002648: 40 00 35 6d call 4000fbfc <__errno> <== NOT EXECUTED 4000264c: b0 06 20 18 add %i0, 0x18, %i0 <== NOT EXECUTED 40002650: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 40002654: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rtems_filesystem_location_detach(&ctx->currentloc); 40002658: 40 00 00 1b call 400026c4 <== NOT EXECUTED 4000265c: 81 e8 00 00 restore <== NOT EXECUTED rtems_filesystem_eval_path_restart(ctx, &ctx->rootloc); 40002660: 92 06 20 30 add %i0, 0x30, %o1 40002664: 7f ff ff a2 call 400024ec 40002668: 90 10 00 18 mov %i0, %o0 ++ctx->recursionlevel; 4000266c: 10 bf ff c9 b 40002590 40002670: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 =============================================================================== 400051f8 : { 400051f8: 9d e3 bf a0 save %sp, -96, %sp size_t pathlen = strlen(path); 400051fc: 40 00 42 b3 call 40015cc8 40005200: 90 10 00 19 mov %i1, %o0 40005204: a0 10 00 08 mov %o0, %l0 while (pathlen > 0) { 40005208: 10 80 00 09 b 4000522c 4000520c: ba 10 00 08 mov %o0, %i5 return c == '/' || c == '\\'; 40005210: c4 4e 40 01 ldsb [ %i1 + %g1 ], %g2 if (rtems_filesystem_is_delimiter(path [i])) { 40005214: 80 a0 a0 2f cmp %g2, 0x2f 40005218: 02 80 00 26 be 400052b0 4000521c: 80 a0 a0 5c cmp %g2, 0x5c 40005220: 02 80 00 25 be 400052b4 <== NEVER TAKEN 40005224: 80 a4 20 00 cmp %l0, 0 pathlen = i; 40005228: ba 10 00 01 mov %g1, %i5 while (pathlen > 0) { 4000522c: 80 a7 60 00 cmp %i5, 0 40005230: 12 bf ff f8 bne 40005210 40005234: 82 07 7f ff add %i5, -1, %g1 if (pathlen > 0) { 40005238: 80 a4 20 00 cmp %l0, 0 4000523c: 12 80 00 18 bne 4000529c 40005240: a4 10 20 00 clr %l2 &rtems_filesystem_root, 40005244: 40 00 02 4a call 40005b6c 40005248: 01 00 00 00 nop &rtems_filesystem_current 4000524c: 40 00 02 48 call 40005b6c 40005250: a2 10 00 08 mov %o0, %l1 currentloc = rtems_filesystem_eval_path_start_with_root_and_current( 40005254: 98 04 60 04 add %l1, 4, %o4 &rtems_filesystem_current 40005258: 9a 10 00 08 mov %o0, %o5 currentloc = rtems_filesystem_eval_path_start_with_root_and_current( 4000525c: 96 10 00 1c mov %i4, %o3 40005260: 94 10 00 1d mov %i5, %o2 40005264: 92 10 00 19 mov %i1, %o1 40005268: 7f ff ff 85 call 4000507c 4000526c: 90 10 00 18 mov %i0, %o0 40005270: 92 10 00 08 mov %o0, %o1 rtems_filesystem_location_clone(parentloc, currentloc); 40005274: 40 00 29 a9 call 4000f918 40005278: 90 10 00 1b mov %i3, %o0 ctx->path = name; 4000527c: e4 26 00 00 st %l2, [ %i0 ] rtems_filesystem_eval_path_continue(ctx); 40005280: 90 10 00 18 mov %i0, %o0 ctx->pathlen = namelen; 40005284: e0 26 20 04 st %l0, [ %i0 + 4 ] return &ctx->currentloc; 40005288: b0 06 20 18 add %i0, 0x18, %i0 rtems_filesystem_eval_path_continue(ctx); 4000528c: 7f ff ff 41 call 40004f90 40005290: f4 26 3f f8 st %i2, [ %i0 + -8 ] } 40005294: 81 c7 e0 08 ret 40005298: 81 e8 00 00 restore if (pathlen > 0) { 4000529c: a4 10 00 19 mov %i1, %l2 parentpathlen = 1; 400052a0: ba 10 20 01 mov 1, %i5 parentpath = "."; 400052a4: 33 10 00 7e sethi %hi(0x4001f800), %i1 400052a8: 10 bf ff e7 b 40005244 400052ac: b2 16 62 28 or %i1, 0x228, %i1 ! 4001fa28 if (pathlen > 0) { 400052b0: 80 a4 20 00 cmp %l0, 0 400052b4: 02 bf ff e4 be 40005244 <== NEVER TAKEN 400052b8: a4 10 20 00 clr %l2 name = path + parentpathlen; 400052bc: a4 06 40 1d add %i1, %i5, %l2 namelen = pathlen - parentpathlen; 400052c0: 10 bf ff e1 b 40005244 400052c4: a0 24 00 1d sub %l0, %i5, %l0 =============================================================================== 400022dc : { 400022dc: 9d e3 bf 98 save %sp, -104, %sp memset(ctx, 0, sizeof(*ctx)); 400022e0: 94 10 20 30 mov 0x30, %o2 400022e4: 92 10 20 00 clr %o1 400022e8: 40 00 37 5a call 40010050 400022ec: 90 06 20 08 add %i0, 8, %o0 ctx->path = path; 400022f0: f2 26 00 00 st %i1, [ %i0 ] { 400022f4: a0 10 00 18 mov %i0, %l0 ctx->pathlen = pathlen; 400022f8: f4 26 20 04 st %i2, [ %i0 + 4 ] if (ctx->pathlen > 0) { 400022fc: 80 a6 a0 00 cmp %i2, 0 40002300: 02 80 00 1c be 40002370 40002304: f6 26 20 10 st %i3, [ %i0 + 0x10 ] char c = ctx->path [0]; 40002308: f6 0e 40 00 ldub [ %i1 ], %i3 ctx->rootloc = rtems_filesystem_global_location_obtain(global_root_ptr); 4000230c: 40 00 01 69 call 400028b0 40002310: 90 10 00 1c mov %i4, %o0 gid_t node_gid ); static inline bool rtems_filesystem_is_delimiter(char c) { return c == '/' || c == '\\'; 40002314: 83 2e e0 18 sll %i3, 0x18, %g1 40002318: 83 38 60 18 sra %g1, 0x18, %g1 if (rtems_filesystem_is_delimiter(c)) { 4000231c: 80 a0 60 2f cmp %g1, 0x2f 40002320: 02 80 00 2c be 400023d0 40002324: d0 26 20 30 st %o0, [ %i0 + 0x30 ] 40002328: 80 a0 60 5c cmp %g1, 0x5c 4000232c: 22 80 00 2a be,a 400023d4 <== NEVER TAKEN 40002330: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED ctx->startloc = rtems_filesystem_global_location_obtain( 40002334: 40 00 01 5f call 400028b0 40002338: 90 10 00 1d mov %i5, %o0 4000233c: d0 26 20 34 st %o0, [ %i0 + 0x34 ] const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; 40002340: d0 02 20 14 ld [ %o0 + 0x14 ], %o0 (*mt_entry->ops->lock_h)( mt_entry ); 40002344: c2 02 20 0c ld [ %o0 + 0xc ], %g1 40002348: c2 00 40 00 ld [ %g1 ], %g1 4000234c: 9f c0 40 00 call %g1 40002350: b0 04 20 18 add %l0, 0x18, %i0 rtems_filesystem_location_clone( 40002354: d2 04 20 34 ld [ %l0 + 0x34 ], %o1 40002358: 40 00 12 d7 call 40006eb4 4000235c: 90 10 00 18 mov %i0, %o0 rtems_filesystem_eval_path_continue(ctx); 40002360: 7f ff ff a4 call 400021f0 40002364: 90 10 00 10 mov %l0, %o0 } 40002368: 81 c7 e0 08 ret 4000236c: 81 e8 00 00 restore rtems_filesystem_global_location_t *global_loc = NULL; 40002370: c0 27 bf fc clr [ %fp + -4 ] return rtems_filesystem_global_location_obtain( &global_loc ); 40002374: 40 00 01 4f call 400028b0 40002378: 90 07 bf fc add %fp, -4, %o0 ctx->rootloc = rtems_filesystem_global_location_obtain_null(); 4000237c: d0 26 20 30 st %o0, [ %i0 + 0x30 ] 40002380: 90 07 bf fc add %fp, -4, %o0 40002384: 40 00 01 4b call 400028b0 40002388: c0 27 bf fc clr [ %fp + -4 ] errno = ENOENT; 4000238c: 40 00 36 1c call 4000fbfc <__errno> 40002390: d0 26 20 34 st %o0, [ %i0 + 0x34 ] 40002394: 82 10 20 02 mov 2, %g1 40002398: c2 22 00 00 st %g1, [ %o0 ] rtems_filesystem_instance_lock(&ctx->startloc->location); 4000239c: d0 06 20 34 ld [ %i0 + 0x34 ], %o0 const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; 400023a0: d0 02 20 14 ld [ %o0 + 0x14 ], %o0 (*mt_entry->ops->lock_h)( mt_entry ); 400023a4: c2 02 20 0c ld [ %o0 + 0xc ], %g1 400023a8: c2 00 40 00 ld [ %g1 ], %g1 400023ac: 9f c0 40 00 call %g1 400023b0: b0 04 20 18 add %l0, 0x18, %i0 rtems_filesystem_location_clone( 400023b4: d2 04 20 34 ld [ %l0 + 0x34 ], %o1 400023b8: 40 00 12 bf call 40006eb4 400023bc: 90 10 00 18 mov %i0, %o0 rtems_filesystem_eval_path_continue(ctx); 400023c0: 7f ff ff 8c call 400021f0 400023c4: 90 10 00 10 mov %l0, %o0 } 400023c8: 81 c7 e0 08 ret 400023cc: 81 e8 00 00 restore ++ctx->path; 400023d0: c4 04 00 00 ld [ %l0 ], %g2 --ctx->pathlen; 400023d4: c2 04 20 04 ld [ %l0 + 4 ], %g1 ++ctx->path; 400023d8: 84 00 a0 01 inc %g2 --ctx->pathlen; 400023dc: 82 00 7f ff add %g1, -1, %g1 ++ctx->path; 400023e0: c4 24 00 00 st %g2, [ %l0 ] ctx->startloc = rtems_filesystem_global_location_obtain( 400023e4: 90 04 20 30 add %l0, 0x30, %o0 --ctx->pathlen; 400023e8: c2 24 20 04 st %g1, [ %l0 + 4 ] ctx->startloc = rtems_filesystem_global_location_obtain( 400023ec: 40 00 01 31 call 400028b0 400023f0: b0 04 20 18 add %l0, 0x18, %i0 400023f4: d0 24 20 34 st %o0, [ %l0 + 0x34 ] const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; 400023f8: d0 02 20 14 ld [ %o0 + 0x14 ], %o0 (*mt_entry->ops->lock_h)( mt_entry ); 400023fc: c2 02 20 0c ld [ %o0 + 0xc ], %g1 40002400: c2 00 40 00 ld [ %g1 ], %g1 40002404: 9f c0 40 00 call %g1 40002408: 01 00 00 00 nop rtems_filesystem_location_clone( 4000240c: d2 04 20 34 ld [ %l0 + 0x34 ], %o1 40002410: 40 00 12 a9 call 40006eb4 40002414: 90 10 00 18 mov %i0, %o0 rtems_filesystem_eval_path_continue(ctx); 40002418: 7f ff ff 76 call 400021f0 4000241c: 90 10 00 10 mov %l0, %o0 } 40002420: 81 c7 e0 08 ret 40002424: 81 e8 00 00 restore =============================================================================== 40001dfc : rtems_filesystem_fsmount_me_t rtems_filesystem_get_mount_handler( const char *type ) { 40001dfc: 9d e3 bf a0 save %sp, -96, %sp find_arg fa = { .type = type, .mount_h = NULL }; if ( type != NULL ) { 40001e00: 80 a6 20 00 cmp %i0, 0 40001e04: 02 80 00 20 be 40001e84 <== NEVER TAKEN 40001e08: 3b 10 00 5d sethi %hi(0x40017400), %i5 while ( table_entry->type && !stop ) { 40001e0c: d0 07 63 f0 ld [ %i5 + 0x3f0 ], %o0 ! 400177f0 40001e10: 80 a2 20 00 cmp %o0, 0 40001e14: 02 80 00 0b be 40001e40 <== NEVER TAKEN 40001e18: ba 17 63 f0 or %i5, 0x3f0, %i5 if ( strcmp( entry->type, fa->type ) != 0 ) { 40001e1c: 40 00 39 82 call 40010424 40001e20: 92 10 00 18 mov %i0, %o1 40001e24: 80 a2 20 00 cmp %o0, 0 40001e28: 22 80 00 17 be,a 40001e84 40001e2c: f0 07 60 04 ld [ %i5 + 4 ], %i0 while ( table_entry->type && !stop ) { 40001e30: d0 07 60 08 ld [ %i5 + 8 ], %o0 40001e34: 80 a2 20 00 cmp %o0, 0 40001e38: 12 bf ff f9 bne 40001e1c 40001e3c: ba 07 60 08 add %i5, 8, %i5 rtems_libio_lock(); 40001e40: 40 00 14 a5 call 400070d4 40001e44: 39 10 00 6a sethi %hi(0x4001a800), %i4 return _Chain_Immutable_head( the_chain )->next; 40001e48: fa 07 23 cc ld [ %i4 + 0x3cc ], %i5 ! 4001abcc 40001e4c: b8 17 23 cc or %i4, 0x3cc, %i4 for ( 40001e50: b8 07 20 04 add %i4, 4, %i4 40001e54: 80 a7 40 1c cmp %i5, %i4 40001e58: 22 80 00 09 be,a 40001e7c <== ALWAYS TAKEN 40001e5c: b0 10 20 00 clr %i0 if ( strcmp( entry->type, fa->type ) != 0 ) { 40001e60: d0 07 60 08 ld [ %i5 + 8 ], %o0 <== NOT EXECUTED 40001e64: 40 00 39 70 call 40010424 <== NOT EXECUTED 40001e68: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40001e6c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40001e70: 32 80 00 09 bne,a 40001e94 <== NOT EXECUTED 40001e74: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED fa->mount_h = entry->mount_h; 40001e78: f0 07 60 0c ld [ %i5 + 0xc ], %i0 <== NOT EXECUTED rtems_libio_unlock(); 40001e7c: 40 00 14 9b call 400070e8 40001e80: 01 00 00 00 nop rtems_filesystem_iterate( find_handler, &fa ); } return fa.mount_h; } 40001e84: 81 c7 e0 08 ret 40001e88: 81 e8 00 00 restore if ( !stop ) { 40001e8c: 81 c7 e0 08 ret <== NOT EXECUTED 40001e90: 81 e8 00 00 restore <== NOT EXECUTED for ( 40001e94: 80 a7 40 1c cmp %i5, %i4 <== NOT EXECUTED 40001e98: 32 bf ff f3 bne,a 40001e64 <== NOT EXECUTED 40001e9c: d0 07 60 08 ld [ %i5 + 8 ], %o0 <== NOT EXECUTED find_arg fa = { 40001ea0: 10 bf ff f7 b 40001e7c <== NOT EXECUTED 40001ea4: b0 10 20 00 clr %i0 <== NOT EXECUTED =============================================================================== 400028b0 : { 400028b0: 9d e3 bf 98 save %sp, -104, %sp if (deferred_released_global_locations != NULL) { 400028b4: 3b 10 00 71 sethi %hi(0x4001c400), %i5 400028b8: c2 07 63 ac ld [ %i5 + 0x3ac ], %g1 ! 4001c7ac 400028bc: 80 a0 60 00 cmp %g1, 0 400028c0: 02 80 00 1e be 40002938 400028c4: 01 00 00 00 nop __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 400028c8: ba 17 63 ac or %i5, 0x3ac, %i5 400028cc: 91 d0 20 09 ta 9 current = deferred_released_global_locations; 400028d0: d0 07 40 00 ld [ %i5 ], %o0 if (current != NULL) { 400028d4: 80 a2 20 00 cmp %o0, 0 400028d8: 02 80 00 07 be 400028f4 <== NEVER TAKEN 400028dc: 92 10 20 00 clr %o1 deferred_released_global_locations = current->deferred_released_next; 400028e0: c4 02 20 1c ld [ %o0 + 0x1c ], %g2 count = current->deferred_released_count; 400028e4: d2 02 20 20 ld [ %o0 + 0x20 ], %o1 deferred_released_global_locations = current->deferred_released_next; 400028e8: c4 27 40 00 st %g2, [ %i5 ] current->deferred_released_next = NULL; 400028ec: c0 22 20 1c clr [ %o0 + 0x1c ] current->deferred_released_count = 0; 400028f0: c0 22 20 20 clr [ %o0 + 0x20 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 400028f4: 91 d0 20 0a ta 0xa 400028f8: 01 00 00 00 nop if (current != NULL) { 400028fc: 80 a2 20 00 cmp %o0, 0 40002900: 02 80 00 0e be 40002938 <== NEVER TAKEN 40002904: 01 00 00 00 nop release_with_count(current, count); 40002908: 7f ff ff be call 40002800 4000290c: 01 00 00 00 nop __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40002910: 91 d0 20 09 ta 9 current = deferred_released_global_locations; 40002914: d0 07 40 00 ld [ %i5 ], %o0 if (current != NULL) { 40002918: 80 a2 20 00 cmp %o0, 0 4000291c: 12 bf ff f1 bne 400028e0 40002920: 92 10 20 00 clr %o1 __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40002924: 91 d0 20 0a ta 0xa 40002928: 01 00 00 00 nop if (current != NULL) { 4000292c: 80 a2 20 00 cmp %o0, 0 40002930: 12 bf ff f6 bne 40002908 <== NEVER TAKEN 40002934: 01 00 00 00 nop __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40002938: 91 d0 20 09 ta 9 global_loc = *global_loc_ptr; 4000293c: f0 06 00 00 ld [ %i0 ], %i0 if (global_loc == NULL || !global_loc->location.mt_entry->mounted) { 40002940: 80 a6 20 00 cmp %i0, 0 40002944: 02 80 00 07 be 40002960 40002948: 01 00 00 00 nop 4000294c: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 40002950: c4 08 a0 28 ldub [ %g2 + 0x28 ], %g2 40002954: 80 a0 a0 00 cmp %g2, 0 40002958: 32 80 00 0a bne,a 40002980 4000295c: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 errno = ENXIO; 40002960: 40 00 34 a7 call 4000fbfc <__errno> 40002964: c2 27 bf fc st %g1, [ %fp + -4 ] 40002968: 84 10 20 06 mov 6, %g2 4000296c: c4 22 00 00 st %g2, [ %o0 ] global_loc = &rtems_filesystem_global_location_null; 40002970: 31 10 00 6b sethi %hi(0x4001ac00), %i0 40002974: c2 07 bf fc ld [ %fp + -4 ], %g1 40002978: b0 16 20 20 or %i0, 0x20, %i0 ++global_loc->reference_count; 4000297c: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 40002980: 84 00 a0 01 inc %g2 40002984: c4 26 20 18 st %g2, [ %i0 + 0x18 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40002988: 91 d0 20 0a ta 0xa 4000298c: 01 00 00 00 nop } 40002990: 81 c7 e0 08 ret 40002994: 81 e8 00 00 restore =============================================================================== 40002998 : if (!deferred) { 40002998: 80 a2 60 00 cmp %o1, 0 4000299c: 22 80 00 16 be,a 400029f4 400029a0: 92 10 20 01 mov 1, %o1 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 400029a4: 91 d0 20 09 ta 9 if (global_loc->deferred_released_count == 0) { 400029a8: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 400029ac: 80 a0 a0 00 cmp %g2, 0 400029b0: 22 80 00 08 be,a 400029d0 <== ALWAYS TAKEN 400029b4: 05 10 00 71 sethi %hi(0x4001c400), %g2 ++global_loc->deferred_released_count; 400029b8: 84 00 a0 01 inc %g2 <== NOT EXECUTED 400029bc: c4 22 20 20 st %g2, [ %o0 + 0x20 ] <== NOT EXECUTED __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 400029c0: 91 d0 20 0a ta 0xa <== NOT EXECUTED 400029c4: 01 00 00 00 nop <== NOT EXECUTED } 400029c8: 81 c3 e0 08 retl <== NOT EXECUTED 400029cc: 01 00 00 00 nop <== NOT EXECUTED rtems_filesystem_global_location_t *head = 400029d0: c6 00 a3 ac ld [ %g2 + 0x3ac ], %g3 global_loc->deferred_released_next = head; 400029d4: c6 22 20 1c st %g3, [ %o0 + 0x1c ] global_loc->deferred_released_count = 1; 400029d8: 86 10 20 01 mov 1, %g3 deferred_released_global_locations = global_loc; 400029dc: d0 20 a3 ac st %o0, [ %g2 + 0x3ac ] global_loc->deferred_released_count = 1; 400029e0: c6 22 20 20 st %g3, [ %o0 + 0x20 ] 400029e4: 91 d0 20 0a ta 0xa 400029e8: 01 00 00 00 nop } 400029ec: 81 c3 e0 08 retl 400029f0: 01 00 00 00 nop release_with_count(global_loc, 1); 400029f4: 82 13 c0 00 mov %o7, %g1 400029f8: 7f ff ff 82 call 40002800 400029fc: 9e 10 40 00 mov %g1, %o7 =============================================================================== 4000181c : /* * Default mode for created files. */ void rtems_filesystem_initialize( void ) { 4000181c: 9d e3 bf a0 save %sp, -96, %sp int rv = 0; const rtems_filesystem_mount_configuration *root_config = &rtems_filesystem_root_configuration; rv = mount( 40001820: 05 10 00 5d sethi %hi(0x40017400), %g2 40001824: 82 10 a3 dc or %g2, 0x3dc, %g1 ! 400177dc 40001828: d0 00 a3 dc ld [ %g2 + 0x3dc ], %o0 4000182c: d8 00 60 10 ld [ %g1 + 0x10 ], %o4 40001830: d6 00 60 0c ld [ %g1 + 0xc ], %o3 40001834: d4 00 60 08 ld [ %g1 + 8 ], %o2 40001838: 40 00 00 a7 call 40001ad4 4000183c: d2 00 60 04 ld [ %g1 + 4 ], %o1 root_config->target, root_config->filesystemtype, root_config->options, root_config->data ); if ( rv != 0 ) 40001840: 80 a2 20 00 cmp %o0, 0 40001844: 12 80 00 0a bne 4000186c <== NEVER TAKEN 40001848: 92 10 21 ed mov 0x1ed, %o1 * Traditionally RTEMS devices are under "/dev" so install this directory. * * If the mkdir() fails, we can't print anything so just fatal error. */ rv = mkdir( "/dev", S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH ); 4000184c: 11 10 00 5e sethi %hi(0x40017800), %o0 40001850: 40 00 00 5c call 400019c0 40001854: 90 12 22 e8 or %o0, 0x2e8, %o0 ! 40017ae8 if ( rv != 0 ) 40001858: 80 a2 20 00 cmp %o0, 0 4000185c: 12 80 00 07 bne 40001878 <== NEVER TAKEN 40001860: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 * it will be mounted onto is created. Moreover, if it is going to * use a device, then it is REALLY unfair to attempt this * before device drivers are initialized. So we return via a base * filesystem image and nothing auto-mounted at this point. */ } 40001864: 81 c7 e0 08 ret 40001868: 81 e8 00 00 restore rtems_fatal_error_occurred( 0xABCD0002 ); 4000186c: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 40001870: 40 00 0c 24 call 40004900 <== NOT EXECUTED 40001874: 90 12 20 02 or %o0, 2, %o0 ! abcd0002 <== NOT EXECUTED rtems_fatal_error_occurred( 0xABCD0003 ); 40001878: 40 00 0c 22 call 40004900 <== NOT EXECUTED 4000187c: 90 12 20 03 or %o0, 3, %o0 <== NOT EXECUTED 40001880: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 40003ba8 : bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { 40003ba8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_chain_control *chain = &filesystem_chain; const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { 40003bac: 3b 10 01 ea sethi %hi(0x4007a800), %i5 <== NOT EXECUTED 40003bb0: c2 07 60 cc ld [ %i5 + 0xcc ], %g1 ! 4007a8cc <== NOT EXECUTED 40003bb4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003bb8: 12 80 00 06 bne 40003bd0 <== NOT EXECUTED 40003bbc: ba 17 60 cc or %i5, 0xcc, %i5 <== NOT EXECUTED 40003bc0: 30 80 00 0f b,a 40003bfc <== NOT EXECUTED 40003bc4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003bc8: 32 80 00 22 bne,a 40003c50 <== NOT EXECUTED 40003bcc: b8 0f 20 ff and %i4, 0xff, %i4 <== NOT EXECUTED stop = (*routine)( table_entry, routine_arg ); 40003bd0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 40003bd4: 9f c6 00 00 call %i0 <== NOT EXECUTED 40003bd8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED while ( table_entry->type && !stop ) { 40003bdc: c2 07 60 08 ld [ %i5 + 8 ], %g1 <== NOT EXECUTED ++table_entry; 40003be0: ba 07 60 08 add %i5, 8, %i5 <== NOT EXECUTED while ( table_entry->type && !stop ) { 40003be4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003be8: 12 bf ff f7 bne 40003bc4 <== NOT EXECUTED 40003bec: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED } if ( !stop ) { 40003bf0: b8 8a 20 ff andcc %o0, 0xff, %i4 <== NOT EXECUTED 40003bf4: 12 80 00 17 bne 40003c50 <== NOT EXECUTED 40003bf8: 01 00 00 00 nop <== NOT EXECUTED rtems_libio_lock(); 40003bfc: 7f ff fd c9 call 40003320 <== NOT EXECUTED 40003c00: 37 10 02 4d sethi %hi(0x40093400), %i3 <== NOT EXECUTED return _Chain_Immutable_head( the_chain )->next; 40003c04: fa 06 e1 60 ld [ %i3 + 0x160 ], %i5 ! 40093560 <== NOT EXECUTED 40003c08: b6 16 e1 60 or %i3, 0x160, %i3 <== NOT EXECUTED for ( 40003c0c: b6 06 e0 04 add %i3, 4, %i3 <== NOT EXECUTED 40003c10: 80 a7 40 1b cmp %i5, %i3 <== NOT EXECUTED 40003c14: 12 80 00 06 bne 40003c2c <== NOT EXECUTED 40003c18: b8 10 20 00 clr %i4 <== NOT EXECUTED 40003c1c: 30 80 00 0b b,a 40003c48 <== NOT EXECUTED node = rtems_chain_first( chain ); !rtems_chain_is_tail( chain, node ) && !stop; 40003c20: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003c24: 12 80 00 09 bne 40003c48 <== NOT EXECUTED 40003c28: 01 00 00 00 nop <== NOT EXECUTED node = rtems_chain_next( node ) ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); 40003c2c: 90 07 60 08 add %i5, 8, %o0 <== NOT EXECUTED 40003c30: 9f c6 00 00 call %i0 <== NOT EXECUTED 40003c34: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED return the_node->next; 40003c38: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED for ( 40003c3c: 80 a7 40 1b cmp %i5, %i3 <== NOT EXECUTED 40003c40: 12 bf ff f8 bne 40003c20 <== NOT EXECUTED 40003c44: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED } rtems_libio_unlock(); 40003c48: 7f ff fd bb call 40003334 <== NOT EXECUTED 40003c4c: b8 0f 20 ff and %i4, 0xff, %i4 <== NOT EXECUTED } return stop; } 40003c50: 81 c7 e0 08 ret <== NOT EXECUTED 40003c54: 91 e8 00 1c restore %g0, %i4, %o0 <== NOT EXECUTED =============================================================================== 40002a00 : __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40002a00: 91 d0 20 09 ta 9 previous = the_node->previous; 40002a04: c6 02 20 04 ld [ %o0 + 4 ], %g3 next = the_node->next; 40002a08: c8 02 00 00 ld [ %o0 ], %g4 next->previous = previous; 40002a0c: c6 21 20 04 st %g3, [ %g4 + 4 ] do_unmount = rtems_filesystem_is_ready_for_unmount(loc->mt_entry); 40002a10: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 previous->next = next; 40002a14: c8 20 c0 00 st %g4, [ %g3 ] 40002a18: c6 08 a0 28 ldub [ %g2 + 0x28 ], %g3 40002a1c: 80 a0 e0 00 cmp %g3, 0 40002a20: 12 80 00 07 bne 40002a3c 40002a24: 01 00 00 00 nop && rtems_chain_has_only_one_node( &mt_entry->location_chain ) 40002a28: c8 00 a0 14 ld [ %g2 + 0x14 ], %g4 40002a2c: c6 00 a0 1c ld [ %g2 + 0x1c ], %g3 40002a30: 80 a1 00 03 cmp %g4, %g3 40002a34: 22 80 00 06 be,a 40002a4c 40002a38: c6 00 a0 24 ld [ %g2 + 0x24 ], %g3 __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40002a3c: 91 d0 20 0a ta 0xa 40002a40: 01 00 00 00 nop } 40002a44: 81 c3 e0 08 retl 40002a48: 01 00 00 00 nop && mt_entry->mt_fs_root->reference_count == 1; 40002a4c: c6 00 e0 18 ld [ %g3 + 0x18 ], %g3 40002a50: 80 a0 e0 01 cmp %g3, 1 40002a54: 12 bf ff fa bne 40002a3c <== ALWAYS TAKEN 40002a58: 86 00 a0 14 add %g2, 0x14, %g3 return &the_chain->Tail.Node; 40002a5c: 88 00 a0 18 add %g2, 0x18, %g4 <== NOT EXECUTED head->previous = NULL; 40002a60: c0 20 a0 18 clr [ %g2 + 0x18 ] <== NOT EXECUTED head->next = tail; 40002a64: c8 20 a0 14 st %g4, [ %g2 + 0x14 ] <== NOT EXECUTED tail->previous = head; 40002a68: c6 20 a0 1c st %g3, [ %g2 + 0x1c ] <== NOT EXECUTED 40002a6c: 91 d0 20 0a ta 0xa <== NOT EXECUTED 40002a70: 01 00 00 00 nop <== NOT EXECUTED rtems_filesystem_do_unmount(loc->mt_entry); 40002a74: d0 02 20 14 ld [ %o0 + 0x14 ], %o0 <== NOT EXECUTED 40002a78: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40002a7c: 7f ff ff 44 call 4000278c <== NOT EXECUTED 40002a80: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 40002b30 : { 40002b30: 9d e3 bf 98 save %sp, -104, %sp rtems_filesystem_global_location_t *global_loc = malloc(sizeof(*global_loc)); 40002b34: 40 00 11 72 call 400070fc 40002b38: 90 10 20 24 mov 0x24, %o0 { 40002b3c: 84 10 00 18 mov %i0, %g2 if (global_loc != NULL) { 40002b40: b0 92 20 00 orcc %o0, 0, %i0 40002b44: 02 80 00 1b be 40002bb0 <== NEVER TAKEN 40002b48: b8 10 20 01 mov 1, %i4 dst->node_access = src->node_access; 40002b4c: fa 00 a0 08 ld [ %g2 + 8 ], %i5 dst->node_access_2 = src->node_access_2; 40002b50: c8 00 a0 0c ld [ %g2 + 0xc ], %g4 dst->handlers = src->handlers; 40002b54: c6 00 a0 10 ld [ %g2 + 0x10 ], %g3 dst->mt_entry = src->mt_entry; 40002b58: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 global_loc->deferred_released_next = NULL; 40002b5c: c0 26 20 1c clr [ %i0 + 0x1c ] global_loc->reference_count = 1; 40002b60: f8 26 20 18 st %i4, [ %i0 + 0x18 ] global_loc->deferred_released_count = 0; 40002b64: c0 26 20 20 clr [ %i0 + 0x20 ] dst->node_access = src->node_access; 40002b68: fa 26 20 08 st %i5, [ %i0 + 8 ] dst->node_access_2 = src->node_access_2; 40002b6c: c8 26 20 0c st %g4, [ %i0 + 0xc ] dst->handlers = src->handlers; 40002b70: c6 26 20 10 st %g3, [ %i0 + 0x10 ] dst->mt_entry = src->mt_entry; 40002b74: c2 26 20 14 st %g1, [ %i0 + 0x14 ] __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40002b78: 91 d0 20 09 ta 9 40002b7c: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 old_last = tail->previous; 40002b80: c8 00 e0 1c ld [ %g3 + 0x1c ], %g4 return &the_chain->Tail.Node; 40002b84: ba 00 e0 18 add %g3, 0x18, %i5 the_node->next = tail; 40002b88: fa 26 00 00 st %i5, [ %i0 ] tail->previous = the_node; 40002b8c: f0 20 e0 1c st %i0, [ %g3 + 0x1c ] old_last->next = the_node; 40002b90: f0 21 00 00 st %i0, [ %g4 ] the_node->previous = old_last; 40002b94: c8 26 20 04 st %g4, [ %i0 + 4 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40002b98: 91 d0 20 0a ta 0xa 40002b9c: 01 00 00 00 nop rtems_filesystem_location_remove_from_mt_entry(loc); 40002ba0: 7f ff ff 98 call 40002a00 40002ba4: 90 10 00 02 mov %g2, %o0 40002ba8: 81 c7 e0 08 ret 40002bac: 81 e8 00 00 restore rtems_filesystem_location_free(loc); 40002bb0: 40 00 11 0e call 40006fe8 <== NOT EXECUTED 40002bb4: 90 10 00 02 mov %g2, %o0 <== NOT EXECUTED return rtems_filesystem_global_location_obtain( &global_loc ); 40002bb8: 90 07 bf fc add %fp, -4, %o0 <== NOT EXECUTED 40002bbc: 7f ff ff 3d call 400028b0 <== NOT EXECUTED 40002bc0: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED errno = ENOMEM; 40002bc4: 40 00 34 0e call 4000fbfc <__errno> <== NOT EXECUTED 40002bc8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40002bcc: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40002bd0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 40002bd4: 81 c7 e0 08 ret <== NOT EXECUTED 40002bd8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 400019dc : const char *name, size_t namelen, mode_t mode, dev_t dev ) { 400019dc: 9d e3 bf a0 save %sp, -96, %sp int rv = 0; mode &= ~rtems_filesystem_umask; 400019e0: 40 00 04 a1 call 40002c64 400019e4: 01 00 00 00 nop 400019e8: d6 02 20 08 ld [ %o0 + 8 ], %o3 400019ec: 96 2e c0 0b andn %i3, %o3, %o3 switch (mode & S_IFMT) { 400019f0: 03 00 00 3c sethi %hi(0xf000), %g1 400019f4: 05 00 00 10 sethi %hi(0x4000), %g2 400019f8: 82 0a c0 01 and %o3, %g1, %g1 400019fc: 80 a0 40 02 cmp %g1, %g2 40001a00: 22 80 00 15 be,a 40001a54 40001a04: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40001a08: 28 80 00 0e bleu,a 40001a40 40001a0c: 82 00 70 00 add %g1, -4096, %g1 40001a10: 05 3f ff e8 sethi %hi(0xffffa000), %g2 40001a14: 82 00 40 02 add %g1, %g2, %g1 40001a18: 05 3f ff f4 sethi %hi(0xffffd000), %g2 40001a1c: 80 88 40 02 btst %g1, %g2 40001a20: 22 80 00 0d be,a 40001a54 <== ALWAYS TAKEN 40001a24: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 case S_IFDIR: case S_IFIFO: case S_IFREG: break; default: errno = EINVAL; 40001a28: 40 00 38 75 call 4000fbfc <__errno> 40001a2c: b0 10 3f ff mov -1, %i0 40001a30: 82 10 20 16 mov 0x16, %g1 40001a34: c2 22 00 00 st %g1, [ %o0 ] rv = (*ops->mknod_h)( parentloc, name, namelen, mode, dev ); } return rv; } 40001a38: 81 c7 e0 08 ret 40001a3c: 81 e8 00 00 restore switch (mode & S_IFMT) { 40001a40: 05 3f ff f8 sethi %hi(0xffffe000), %g2 40001a44: 80 88 40 02 btst %g1, %g2 40001a48: 12 bf ff f8 bne 40001a28 40001a4c: 01 00 00 00 nop const rtems_filesystem_operations_table *ops = parentloc->mt_entry->ops; 40001a50: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 rv = (*ops->mknod_h)( parentloc, name, namelen, mode, dev ); 40001a54: c2 00 60 0c ld [ %g1 + 0xc ], %g1 40001a58: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 40001a5c: 98 10 00 1c mov %i4, %o4 40001a60: 9a 10 00 1d mov %i5, %o5 40001a64: 94 10 00 1a mov %i2, %o2 40001a68: 92 10 00 19 mov %i1, %o1 40001a6c: 9f c0 40 00 call %g1 40001a70: 90 10 00 18 mov %i0, %o0 40001a74: 81 c7 e0 08 ret 40001a78: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 400065f8 : bool rtems_filesystem_mount_iterate( rtems_filesystem_mt_entry_visitor visitor, void *visitor_arg ) { 400065f8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_libio_lock(); 400065fc: 7f ff f3 49 call 40003320 <== NOT EXECUTED 40006600: 39 10 02 4d sethi %hi(0x40093400), %i4 <== NOT EXECUTED return _Chain_Immutable_head( the_chain )->next; 40006604: fa 07 21 54 ld [ %i4 + 0x154 ], %i5 ! 40093554 <== NOT EXECUTED 40006608: b8 17 21 54 or %i4, 0x154, %i4 <== NOT EXECUTED rtems_chain_control *chain = &rtems_filesystem_mount_table; rtems_chain_node *node = NULL; bool stop = false; rtems_filesystem_mt_lock(); for ( 4000660c: b8 07 20 04 add %i4, 4, %i4 <== NOT EXECUTED 40006610: 80 a7 40 1c cmp %i5, %i4 <== NOT EXECUTED 40006614: 12 80 00 07 bne 40006630 <== NOT EXECUTED 40006618: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED bool stop = false; 4000661c: 10 80 00 0b b 40006648 <== NOT EXECUTED 40006620: b6 10 20 00 clr %i3 <== NOT EXECUTED node = rtems_chain_first( chain ); !rtems_chain_is_tail( chain, node ) && !stop; 40006624: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40006628: 12 80 00 08 bne 40006648 <== NOT EXECUTED 4000662c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED node = rtems_chain_next( node ) ) { const rtems_filesystem_mount_table_entry_t *mt_entry = (rtems_filesystem_mount_table_entry_t *) node; stop = (*visitor)( mt_entry, visitor_arg ); 40006630: 9f c6 00 00 call %i0 <== NOT EXECUTED 40006634: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED return the_node->next; 40006638: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED for ( 4000663c: 80 a7 40 1c cmp %i5, %i4 <== NOT EXECUTED 40006640: 12 bf ff f9 bne 40006624 <== NOT EXECUTED 40006644: b6 10 00 08 mov %o0, %i3 <== NOT EXECUTED rtems_libio_unlock(); 40006648: 7f ff f3 3b call 40003334 <== NOT EXECUTED 4000664c: b0 0e e0 ff and %i3, 0xff, %i0 <== NOT EXECUTED } rtems_filesystem_mt_unlock(); return stop; } 40006650: 81 c7 e0 08 ret <== NOT EXECUTED 40006654: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40001c70 : int rtems_filesystem_register( const char *type, rtems_filesystem_fsmount_me_t mount_h ) { 40001c70: 9d e3 bf 98 save %sp, -104, %sp rtems_chain_control *chain = &filesystem_chain; size_t type_size = strlen(type) + 1; 40001c74: 40 00 33 0a call 4000e89c 40001c78: 90 10 00 18 mov %i0, %o0 40001c7c: 94 02 20 01 add %o0, 1, %o2 size_t fsn_size = sizeof( filesystem_node ) + type_size; filesystem_node *fsn = malloc( fsn_size ); 40001c80: 90 02 20 11 add %o0, 0x11, %o0 40001c84: 40 00 17 b6 call 40007b5c 40001c88: d4 27 bf fc st %o2, [ %fp + -4 ] char *type_storage = (char *) fsn + sizeof( *fsn ); if ( fsn == NULL ) 40001c8c: d4 07 bf fc ld [ %fp + -4 ], %o2 filesystem_node *fsn = malloc( fsn_size ); 40001c90: b8 10 00 08 mov %o0, %i4 if ( fsn == NULL ) 40001c94: 80 a2 20 00 cmp %o0, 0 40001c98: 02 80 00 4b be 40001dc4 40001c9c: 82 02 20 10 add %o0, 0x10, %g1 rtems_set_errno_and_return_minus_one( ENOMEM ); memcpy(type_storage, type, type_size); 40001ca0: 92 10 00 18 mov %i0, %o1 40001ca4: 40 00 31 ba call 4000e38c 40001ca8: 90 10 00 01 mov %g1, %o0 fsn->entry.type = type_storage; fsn->entry.mount_h = mount_h; 40001cac: f2 27 20 0c st %i1, [ %i4 + 0xc ] while ( table_entry->type && !stop ) { 40001cb0: 3b 10 00 3c sethi %hi(0x4000f000), %i5 rtems_libio_lock(); 40001cb4: 40 00 17 a0 call 40007b34 40001cb8: d0 27 20 08 st %o0, [ %i4 + 8 ] while ( table_entry->type && !stop ) { 40001cbc: d0 07 61 88 ld [ %i5 + 0x188 ], %o0 40001cc0: 80 a2 20 00 cmp %o0, 0 40001cc4: 02 80 00 0b be 40001cf0 <== NEVER TAKEN 40001cc8: ba 17 61 88 or %i5, 0x188, %i5 if ( strcmp( entry->type, fa->type ) != 0 ) { 40001ccc: 40 00 32 90 call 4000e70c 40001cd0: 92 10 00 18 mov %i0, %o1 40001cd4: 80 a2 20 00 cmp %o0, 0 40001cd8: 22 80 00 18 be,a 40001d38 <== NEVER TAKEN 40001cdc: fa 07 60 04 ld [ %i5 + 4 ], %i5 <== NOT EXECUTED while ( table_entry->type && !stop ) { 40001ce0: d0 07 60 08 ld [ %i5 + 8 ], %o0 40001ce4: 80 a2 20 00 cmp %o0, 0 40001ce8: 12 bf ff f9 bne 40001ccc <== NEVER TAKEN 40001cec: ba 07 60 08 add %i5, 8, %i5 rtems_libio_lock(); 40001cf0: 40 00 17 91 call 40007b34 40001cf4: 35 10 00 47 sethi %hi(0x40011c00), %i2 40001cf8: f6 06 a1 8c ld [ %i2 + 0x18c ], %i3 ! 40011d8c 40001cfc: b4 16 a1 8c or %i2, 0x18c, %i2 for ( 40001d00: ba 06 a0 04 add %i2, 4, %i5 40001d04: 80 a6 c0 1d cmp %i3, %i5 40001d08: 02 80 00 2b be 40001db4 40001d0c: 01 00 00 00 nop if ( strcmp( entry->type, fa->type ) != 0 ) { 40001d10: d0 06 e0 08 ld [ %i3 + 8 ], %o0 40001d14: 40 00 32 7e call 4000e70c 40001d18: 92 10 00 18 mov %i0, %o1 40001d1c: 80 a2 20 00 cmp %o0, 0 40001d20: 32 80 00 14 bne,a 40001d70 40001d24: f6 06 c0 00 ld [ %i3 ], %i3 rtems_libio_unlock(); 40001d28: 40 00 17 88 call 40007b48 40001d2c: fa 06 e0 0c ld [ %i3 + 0xc ], %i5 if ( rtems_filesystem_get_mount_handler( type ) == NULL ) { 40001d30: 10 80 00 03 b 40001d3c 40001d34: 80 a7 60 00 cmp %i5, 0 40001d38: 80 a7 60 00 cmp %i5, 0 <== NOT EXECUTED 40001d3c: 12 80 00 14 bne 40001d8c 40001d40: 3b 10 00 47 sethi %hi(0x40011c00), %i5 40001d44: ba 17 61 90 or %i5, 0x190, %i5 ! 40011d90 40001d48: b4 07 7f fc add %i5, -4, %i2 old_last = tail->previous; 40001d4c: c2 06 a0 08 ld [ %i2 + 8 ], %g1 the_node->next = tail; 40001d50: fa 27 00 00 st %i5, [ %i4 ] rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_unlock(); return 0; 40001d54: b0 10 20 00 clr %i0 tail->previous = the_node; 40001d58: f8 26 a0 08 st %i4, [ %i2 + 8 ] old_last->next = the_node; 40001d5c: f8 20 40 00 st %i4, [ %g1 ] rtems_libio_unlock(); 40001d60: 40 00 17 7a call 40007b48 40001d64: c2 27 20 04 st %g1, [ %i4 + 4 ] return 0; 40001d68: 81 c7 e0 08 ret 40001d6c: 81 e8 00 00 restore for ( 40001d70: 80 a6 c0 1d cmp %i3, %i5 40001d74: 32 bf ff e8 bne,a 40001d14 40001d78: d0 06 e0 08 ld [ %i3 + 8 ], %o0 rtems_libio_unlock(); 40001d7c: 40 00 17 73 call 40007b48 40001d80: ba 10 20 00 clr %i5 if ( rtems_filesystem_get_mount_handler( type ) == NULL ) { 40001d84: 10 bf ff ee b 40001d3c 40001d88: 80 a7 60 00 cmp %i5, 0 rtems_libio_unlock(); 40001d8c: 40 00 17 6f call 40007b48 40001d90: b0 10 3f ff mov -1, %i0 free( fsn ); 40001d94: 40 00 16 f3 call 40007960 40001d98: 90 10 00 1c mov %i4, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 40001d9c: 40 00 31 55 call 4000e2f0 <__errno> 40001da0: 01 00 00 00 nop 40001da4: 82 10 20 16 mov 0x16, %g1 ! 16 <_TLS_Alignment+0x15> 40001da8: c2 22 00 00 st %g1, [ %o0 ] } 40001dac: 81 c7 e0 08 ret 40001db0: 81 e8 00 00 restore rtems_libio_unlock(); 40001db4: 40 00 17 65 call 40007b48 40001db8: 01 00 00 00 nop old_last = tail->previous; 40001dbc: 10 bf ff e5 b 40001d50 40001dc0: c2 06 a0 08 ld [ %i2 + 8 ], %g1 rtems_set_errno_and_return_minus_one( ENOMEM ); 40001dc4: 40 00 31 4b call 4000e2f0 <__errno> 40001dc8: b0 10 3f ff mov -1, %i0 40001dcc: 82 10 20 0c mov 0xc, %g1 40001dd0: c2 22 00 00 st %g1, [ %o0 ] 40001dd4: 81 c7 e0 08 ret 40001dd8: 81 e8 00 00 restore =============================================================================== 400019a0 : } int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *)) { 400019a0: 9d e3 bf a0 save %sp, -96, %sp int eno; pthread_key_t *pkey; pkey = malloc( sizeof( *pkey ) ); 400019a4: 40 00 00 99 call 40001c08 400019a8: 90 10 20 04 mov 4, %o0 *key = pkey; 400019ac: d0 26 00 00 st %o0, [ %i0 ] { 400019b0: b8 10 00 18 mov %i0, %i4 if ( pkey == NULL ) 400019b4: 80 a2 20 00 cmp %o0, 0 400019b8: 02 80 00 0e be 400019f0 <== NEVER TAKEN 400019bc: ba 10 00 08 mov %o0, %i5 printk( "gxx_wrappers: create key=%x, dtor=%x, pkey=%x\n", key, dtor, pkey ); #endif eno = pthread_key_create(pkey, dtor); 400019c0: 40 00 0c 6f call 40004b7c 400019c4: 92 10 00 19 mov %i1, %o1 if ( eno != 0 ) { 400019c8: b0 92 20 00 orcc %o0, 0, %i0 400019cc: 12 80 00 04 bne 400019dc <== NEVER TAKEN 400019d0: 01 00 00 00 nop free( pkey ); *key = NULL; } return eno; } 400019d4: 81 c7 e0 08 ret 400019d8: 81 e8 00 00 restore free( pkey ); 400019dc: 40 00 24 4d call 4000ab10 <== NOT EXECUTED 400019e0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED *key = NULL; 400019e4: c0 27 00 00 clr [ %i4 ] <== NOT EXECUTED 400019e8: 81 c7 e0 08 ret <== NOT EXECUTED 400019ec: 81 e8 00 00 restore <== NOT EXECUTED } 400019f0: 81 c7 e0 08 ret <== NOT EXECUTED 400019f4: 91 e8 20 0c restore %g0, 0xc, %o0 <== NOT EXECUTED =============================================================================== 40001aa4 : /* * MUTEX support */ void rtems_gxx_mutex_init (__gthread_mutex_t *mutex) { 40001aa4: 9d e3 bf a0 save %sp, -96, %sp #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: mutex init =%X\n", *mutex ); #endif status = rtems_semaphore_create( 40001aa8: 96 10 20 00 clr %o3 40001aac: 98 10 00 18 mov %i0, %o4 40001ab0: 94 10 20 54 mov 0x54, %o2 40001ab4: 92 10 20 01 mov 1, %o1 40001ab8: 11 11 d0 d0 sethi %hi(0x47434000), %o0 40001abc: 40 00 0d 31 call 40004f80 40001ac0: 90 12 23 32 or %o0, 0x332, %o0 ! 47434332 RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE| RTEMS_INHERIT_PRIORITY|RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL, 0, (rtems_id *)mutex ); if ( status != RTEMS_SUCCESSFUL ) { 40001ac4: 80 a2 20 00 cmp %o0, 0 40001ac8: 12 80 00 04 bne 40001ad8 40001acc: 01 00 00 00 nop _Internal_error( INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED ); } #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: mutex init complete =%X\n", *mutex ); #endif } 40001ad0: 81 c7 e0 08 ret 40001ad4: 81 e8 00 00 restore _Internal_error( INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED ); 40001ad8: 40 00 12 45 call 400063ec <_Internal_error> 40001adc: 90 10 20 16 mov 0x16, %o0 40001ae0: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 40001b64 : void rtems_gxx_recursive_mutex_init(__gthread_recursive_mutex_t *mutex) { 40001b64: 9d e3 bf a0 save %sp, -96, %sp status = rtems_semaphore_create( 40001b68: 96 10 20 00 clr %o3 40001b6c: 98 10 00 18 mov %i0, %o4 40001b70: 94 10 20 54 mov 0x54, %o2 40001b74: 92 10 20 01 mov 1, %o1 40001b78: 11 11 d0 d0 sethi %hi(0x47434000), %o0 40001b7c: 40 00 0d 01 call 40004f80 40001b80: 90 12 23 32 or %o0, 0x332, %o0 ! 47434332 if ( status != RTEMS_SUCCESSFUL ) { 40001b84: 80 a2 20 00 cmp %o0, 0 40001b88: 12 80 00 04 bne 40001b98 <== NEVER TAKEN 40001b8c: 01 00 00 00 nop rtems_gxx_mutex_init(mutex); } 40001b90: 81 c7 e0 08 ret 40001b94: 81 e8 00 00 restore _Internal_error( INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED ); 40001b98: 40 00 12 15 call 400063ec <_Internal_error> <== NOT EXECUTED 40001b9c: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40001ba0: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 40001a60 : int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr) { 40001a60: 9d e3 bf a0 save %sp, -96, %sp pthread_key_t *pkey = key; int eno; if ( pkey == NULL ) { 40001a64: 80 a6 20 00 cmp %i0, 0 40001a68: 02 80 00 0a be 40001a90 40001a6c: 01 00 00 00 nop return EINVAL; } eno = pthread_setspecific( *pkey, ptr ); 40001a70: d0 06 00 00 ld [ %i0 ], %o0 40001a74: 40 00 0c b6 call 40004d4c 40001a78: 92 10 00 19 mov %i1, %o1 ptr, rtems_task_self() ); #endif if ( eno != 0 ) { 40001a7c: b0 92 20 00 orcc %o0, 0, %i0 40001a80: 12 80 00 06 bne 40001a98 40001a84: 01 00 00 00 nop _Internal_error( INTERNAL_ERROR_GXX_KEY_ADD_FAILED ); } return 0; } 40001a88: 81 c7 e0 08 ret 40001a8c: 81 e8 00 00 restore 40001a90: 81 c7 e0 08 ret 40001a94: 91 e8 20 16 restore %g0, 0x16, %o0 _Internal_error( INTERNAL_ERROR_GXX_KEY_ADD_FAILED ); 40001a98: 40 00 12 55 call 400063ec <_Internal_error> 40001a9c: 90 10 20 15 mov 0x15, %o0 40001aa0: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 4000718c : void *rtems_heap_allocate_aligned_with_boundary( size_t size, uintptr_t alignment, uintptr_t boundary ) { 4000718c: 9d e3 bf a0 save %sp, -96, %sp 40007190: 03 10 00 71 sethi %hi(0x4001c400), %g1 40007194: c2 00 63 bc ld [ %g1 + 0x3bc ], %g1 ! 4001c7bc <_System_state_Current> Heap_Control *heap = RTEMS_Malloc_Heap; 40007198: 05 10 00 72 sethi %hi(0x4001c800), %g2 if ( _System_state_Is_up( state ) ) { 4000719c: 80 a0 60 02 cmp %g1, 2 400071a0: 02 80 00 13 be 400071ec 400071a4: f8 00 a0 28 ld [ %g2 + 0x28 ], %i4 } else if ( _System_state_Is_before_multitasking( state ) ) { 400071a8: 80 a0 60 01 cmp %g1, 1 400071ac: 02 80 00 14 be 400071fc 400071b0: 96 10 00 1a mov %i2, %o3 boundary ); _RTEMS_Unlock_allocator(); break; case MALLOC_SYSTEM_STATE_NO_PROTECTION: p = _Heap_Allocate_aligned_with_boundary( 400071b4: 94 10 00 19 mov %i1, %o2 400071b8: 92 10 00 18 mov %i0, %o1 400071bc: 40 00 03 21 call 40007e40 <_Heap_Allocate_aligned_with_boundary> 400071c0: 90 10 00 1c mov %i4, %o0 400071c4: ba 10 00 08 mov %o0, %i5 * Do not attempt to allocate memory if not in correct system state. */ return NULL; } if ( p == NULL && alignment == 0 && boundary == 0 ) { 400071c8: 80 97 40 19 orcc %i5, %i1, %g0 400071cc: 12 80 00 1b bne 40007238 <== ALWAYS TAKEN 400071d0: 80 a7 60 00 cmp %i5, 0 400071d4: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 400071d8: 02 80 00 23 be 40007264 <== ALWAYS TAKEN 400071dc: 03 10 00 5f sethi %hi(0x40017c00), %g1 return NULL; 400071e0: ba 10 20 00 clr %i5 */ if ( p != NULL && rtems_malloc_dirty_helper != NULL ) (*rtems_malloc_dirty_helper)( p, size ); return p; } 400071e4: 81 c7 e0 08 ret 400071e8: 91 e8 00 1d restore %g0, %i5, %o0 400071ec: c2 01 a0 18 ld [ %g6 + 0x18 ], %g1 if ( _Thread_Dispatch_is_enabled() ) { 400071f0: 80 a0 60 00 cmp %g1, 0 400071f4: 32 bf ff fc bne,a 400071e4 400071f8: ba 10 20 00 clr %i5 _RTEMS_Lock_allocator(); 400071fc: 40 00 02 b9 call 40007ce0 <_RTEMS_Lock_allocator> 40007200: 01 00 00 00 nop _Malloc_Process_deferred_frees(); 40007204: 7f ff ff 60 call 40006f84 <_Malloc_Process_deferred_frees> 40007208: 01 00 00 00 nop p = _Heap_Allocate_aligned_with_boundary( 4000720c: 96 10 00 1a mov %i2, %o3 40007210: 94 10 00 19 mov %i1, %o2 40007214: 92 10 00 18 mov %i0, %o1 40007218: 40 00 03 0a call 40007e40 <_Heap_Allocate_aligned_with_boundary> 4000721c: 90 10 00 1c mov %i4, %o0 _RTEMS_Unlock_allocator(); 40007220: 40 00 02 b5 call 40007cf4 <_RTEMS_Unlock_allocator> 40007224: ba 10 00 08 mov %o0, %i5 if ( p == NULL && alignment == 0 && boundary == 0 ) { 40007228: 80 97 40 19 orcc %i5, %i1, %g0 4000722c: 02 bf ff eb be 400071d8 40007230: 80 a6 a0 00 cmp %i2, 0 if ( p != NULL && rtems_malloc_dirty_helper != NULL ) 40007234: 80 a7 60 00 cmp %i5, 0 40007238: 02 bf ff ea be 400071e0 4000723c: 03 10 00 72 sethi %hi(0x4001c800), %g1 40007240: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 ! 4001c824 40007244: 80 a0 60 00 cmp %g1, 0 40007248: 02 bf ff e7 be 400071e4 4000724c: 92 10 00 18 mov %i0, %o1 (*rtems_malloc_dirty_helper)( p, size ); 40007250: 90 10 00 1d mov %i5, %o0 40007254: 9f c0 40 00 call %g1 40007258: b0 10 00 1d mov %i5, %i0 } 4000725c: 81 c7 e0 08 ret 40007260: 81 e8 00 00 restore p = (*rtems_malloc_extend_handler)( heap, size ); 40007264: c2 00 61 e0 ld [ %g1 + 0x1e0 ], %g1 40007268: 92 10 00 18 mov %i0, %o1 4000726c: 9f c0 40 00 call %g1 40007270: 90 10 00 1c mov %i4, %o0 40007274: 10 bf ff f0 b 40007234 40007278: ba 10 00 08 mov %o0, %i5 =============================================================================== 40001ff4 : void *rtems_heap_extend_via_sbrk( Heap_Control *heap, size_t alloc_size ) { 40001ff4: 9d e3 bf a0 save %sp, -96, %sp ptrdiff_t sbrk_amount = RTEMS_Malloc_Sbrk_amount; 40001ff8: 03 10 00 50 sethi %hi(0x40014000), %g1 40001ffc: c4 00 61 b0 ld [ %g1 + 0x1b0 ], %g2 ! 400141b0 ptrdiff_t sbrk_size = (ptrdiff_t) alloc_size; ptrdiff_t misaligned = sbrk_amount != 0 ? sbrk_size % sbrk_amount : 0; 40002000: 80 a0 a0 00 cmp %g2, 0 40002004: 02 80 00 20 be 40002084 40002008: 01 00 00 00 nop 4000200c: 87 3e 60 1f sra %i1, 0x1f, %g3 40002010: 81 80 e0 00 wr %g3, %y 40002014: 01 00 00 00 nop 40002018: 01 00 00 00 nop 4000201c: 01 00 00 00 nop 40002020: 82 7e 40 02 sdiv %i1, %g2, %g1 40002024: 82 58 40 02 smul %g1, %g2, %g1 void *return_this = NULL; if ( misaligned != 0 ) { 40002028: 82 a6 40 01 subcc %i1, %g1, %g1 4000202c: 12 80 00 18 bne 4000208c 40002030: ba 10 00 19 mov %i1, %i5 sbrk_size += sbrk_amount - misaligned; } if ( sbrk_size > 0 && sbrk_amount > 0 ) { 40002034: 80 a7 60 00 cmp %i5, 0 40002038: 04 80 00 13 ble 40002084 <== NEVER TAKEN 4000203c: 80 a0 a0 00 cmp %g2, 0 40002040: 04 80 00 11 ble 40002084 <== NEVER TAKEN 40002044: 01 00 00 00 nop void *area_begin = sbrk( sbrk_size ); 40002048: 7f ff fd 6f call 40001604 4000204c: 90 10 00 1d mov %i5, %o0 if ( area_begin != (void *) -1 ) { 40002050: 80 a2 3f ff cmp %o0, -1 40002054: 02 80 00 0c be 40002084 40002058: 92 10 00 08 mov %o0, %o1 bool ok = _Protected_heap_Extend( heap, area_begin, sbrk_size ); 4000205c: 94 10 00 1d mov %i5, %o2 40002060: 40 00 0f 73 call 40005e2c <_Protected_heap_Extend> 40002064: 90 10 00 18 mov %i0, %o0 if ( ok ) { 40002068: 80 a2 20 00 cmp %o0, 0 4000206c: 02 80 00 04 be 4000207c 40002070: b6 10 20 00 clr %i3 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 40002074: 40 00 0f 62 call 40005dfc <_Protected_heap_Allocate_aligned_with_boundary> 40002078: 95 e8 20 00 restore %g0, 0, %o2 return_this = _Protected_heap_Allocate( heap, alloc_size ); } else { sbrk( -sbrk_size ); 4000207c: 7f ff fd 62 call 40001604 40002080: 90 20 00 1d neg %i5, %o0 } } } return return_this; } 40002084: 81 c7 e0 08 ret 40002088: 91 e8 20 00 restore %g0, 0, %o0 sbrk_size += sbrk_amount - misaligned; 4000208c: 82 20 80 01 sub %g2, %g1, %g1 40002090: 10 bf ff e9 b 40002034 40002094: ba 06 40 01 add %i1, %g1, %i5 =============================================================================== 40007378 : Heap_Control *heap RTEMS_UNUSED, size_t alloc_size RTEMS_UNUSED ) { return NULL; } 40007378: 81 c3 e0 08 retl 4000737c: 90 10 20 00 clr %o0 ! 0 =============================================================================== 40007300 : /* * This is a replaceable stub which opens the console, if present. */ void rtems_libio_post_driver(void) { 40007300: 9d e3 bf a0 save %sp, -96, %sp /* * Attempt to open /dev/console. */ if ( open( CONSOLE_DEVICE_NAME, O_RDONLY, 0 ) != STDIN_FILENO ) { 40007304: 94 10 20 00 clr %o2 40007308: 92 10 20 00 clr %o1 4000730c: 3b 10 00 5f sethi %hi(0x40017c00), %i5 40007310: 40 00 0e 20 call 4000ab90 40007314: 90 17 61 e8 or %i5, 0x1e8, %o0 ! 40017de8 40007318: 80 a2 20 00 cmp %o0, 0 4000731c: 02 80 00 04 be 4000732c 40007320: 94 10 20 00 clr %o2 if ( open( CONSOLE_DEVICE_NAME, O_WRONLY, 0 ) != STDERR_FILENO ) { _Internal_error( INTERNAL_ERROR_LIBIO_STDERR_FD_OPEN_FAILED ); } atexit(rtems_libio_exit); } 40007324: 81 c7 e0 08 ret 40007328: 81 e8 00 00 restore if ( open( CONSOLE_DEVICE_NAME, O_WRONLY, 0 ) != STDOUT_FILENO ) { 4000732c: 92 10 20 01 mov 1, %o1 40007330: 40 00 0e 18 call 4000ab90 40007334: 90 17 61 e8 or %i5, 0x1e8, %o0 40007338: 80 a2 20 01 cmp %o0, 1 4000733c: 12 80 00 0a bne 40007364 40007340: 94 10 20 00 clr %o2 if ( open( CONSOLE_DEVICE_NAME, O_WRONLY, 0 ) != STDERR_FILENO ) { 40007344: 92 10 20 01 mov 1, %o1 40007348: 40 00 0e 12 call 4000ab90 4000734c: 90 17 61 e8 or %i5, 0x1e8, %o0 40007350: 80 a2 20 02 cmp %o0, 2 40007354: 12 80 00 06 bne 4000736c 40007358: 31 10 00 2a sethi %hi(0x4000a800), %i0 atexit(rtems_libio_exit); 4000735c: 40 00 22 1c call 4000fbcc 40007360: 91 ee 22 b8 restore %i0, 0x2b8, %o0 _Internal_error( INTERNAL_ERROR_LIBIO_STDOUT_FD_OPEN_FAILED ); 40007364: 7f ff f5 96 call 400049bc <_Internal_error> 40007368: 90 10 20 24 mov 0x24, %o0 _Internal_error( INTERNAL_ERROR_LIBIO_STDERR_FD_OPEN_FAILED ); 4000736c: 7f ff f5 94 call 400049bc <_Internal_error> 40007370: 90 10 20 25 mov 0x25, %o0 40007374: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 400045c0 : { 400045c0: 9d e3 bf a0 save %sp, -96, %sp rtems_user_env_t *old_env = rtems_current_user_env; 400045c4: 40 00 05 90 call 40005c04 400045c8: 39 10 05 ea sethi %hi(0x4017a800), %i4 if (uses_global_env) { 400045cc: b8 17 20 0c or %i4, 0xc, %i4 ! 4017a80c rtems_user_env_t *old_env = rtems_current_user_env; 400045d0: ba 10 00 08 mov %o0, %i5 if (uses_global_env) { 400045d4: 80 a2 00 1c cmp %o0, %i4 400045d8: 12 80 00 23 bne 40004664 400045dc: b0 10 20 00 clr %i0 _Thread_Set_life_protection(THREAD_LIFE_PROTECTED); 400045e0: 40 00 23 75 call 4000d3b4 <_Thread_Set_life_protection> 400045e4: 90 10 20 01 mov 1, %o0 rtems_user_env_t *new_env = calloc(1, sizeof(*new_env)); 400045e8: 92 10 20 48 mov 0x48, %o1 _Thread_Set_life_protection(THREAD_LIFE_PROTECTED); 400045ec: b4 10 00 08 mov %o0, %i2 rtems_user_env_t *new_env = calloc(1, sizeof(*new_env)); 400045f0: 7f ff fb ac call 400034a0 400045f4: 90 10 20 01 mov 1, %o0 if (new_env != NULL) { 400045f8: b6 92 20 00 orcc %o0, 0, %i3 400045fc: 02 80 00 26 be 40004694 40004600: 94 10 20 48 mov 0x48, %o2 *new_env = *old_env; 40004604: 40 00 6d 92 call 4001fc4c 40004608: 92 10 00 1d mov %i5, %o1 rtems_filesystem_global_location_obtain(&old_env->root_directory); 4000460c: 40 00 04 15 call 40005660 40004610: 90 07 60 04 add %i5, 4, %o0 40004614: 82 10 00 08 mov %o0, %g1 new_env->root_directory = 40004618: c2 26 e0 04 st %g1, [ %i3 + 4 ] rtems_filesystem_global_location_obtain(&old_env->current_directory); 4000461c: 40 00 04 11 call 40005660 40004620: 90 10 00 1d mov %i5, %o0 return loc->handlers == &rtems_filesystem_null_handlers; 40004624: c2 06 e0 04 ld [ %i3 + 4 ], %g1 new_env->current_directory = 40004628: d0 26 c0 00 st %o0, [ %i3 ] if ( 4000462c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 40004630: 03 10 00 cd sethi %hi(0x40033400), %g1 40004634: 82 10 62 b8 or %g1, 0x2b8, %g1 ! 400336b8 40004638: 80 a0 80 01 cmp %g2, %g1 4000463c: 02 80 00 0c be 4000466c 40004640: 80 a6 c0 1c cmp %i3, %i4 && !rtems_filesystem_global_location_is_null(new_env->current_directory) 40004644: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 40004648: 80 a0 80 01 cmp %g2, %g1 4000464c: 02 80 00 08 be 4000466c <== NEVER TAKEN 40004650: 80 a6 c0 1c cmp %i3, %i4 executing->user_environment = new_env; 40004654: c2 01 a0 20 ld [ %g6 + 0x20 ], %g1 40004658: f6 20 61 84 st %i3, [ %g1 + 0x184 ] _Thread_Set_life_protection(life_state); 4000465c: 40 00 23 56 call 4000d3b4 <_Thread_Set_life_protection> 40004660: 90 10 00 1a mov %i2, %o0 } 40004664: 81 c7 e0 08 ret 40004668: 81 e8 00 00 restore if (!uses_global_env) { 4000466c: 02 bf ff fc be 4000465c <== NEVER TAKEN 40004670: b0 10 20 0d mov 0xd, %i0 rtems_filesystem_global_location_release(env->current_directory, false); 40004674: 40 00 04 35 call 40005748 40004678: 92 10 20 00 clr %o1 rtems_filesystem_global_location_release(env->root_directory, false); 4000467c: d0 06 e0 04 ld [ %i3 + 4 ], %o0 40004680: 40 00 04 32 call 40005748 40004684: 92 10 20 00 clr %o1 free(env); 40004688: 7f ff fc 28 call 40003728 4000468c: 90 10 00 1b mov %i3, %o0 } 40004690: 30 bf ff f3 b,a 4000465c sc = RTEMS_NO_MEMORY; 40004694: 10 bf ff f2 b 4000465c 40004698: b0 10 20 1a mov 0x1a, %i0 =============================================================================== 400031ac : int rtems_libio_to_fcntl_flags( unsigned int flags ) { int fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 400031ac: 84 0a 20 06 and %o0, 6, %g2 400031b0: 80 a0 a0 06 cmp %g2, 6 400031b4: 02 80 00 05 be 400031c8 400031b8: 82 10 20 02 mov 2, %g1 fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 400031bc: 80 8a 20 02 btst 2, %o0 400031c0: 02 80 00 0b be 400031ec <== NEVER TAKEN 400031c4: 82 10 20 00 clr %g1 fcntl_flags |= O_RDONLY; } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { fcntl_flags |= O_WRONLY; } if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) { 400031c8: 80 8a 20 01 btst 1, %o0 400031cc: 02 80 00 04 be 400031dc 400031d0: 80 8a 22 00 btst 0x200, %o0 fcntl_flags |= O_NONBLOCK; 400031d4: 05 00 00 10 sethi %hi(0x4000), %g2 400031d8: 82 10 40 02 or %g1, %g2, %g1 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 400031dc: 32 80 00 02 bne,a 400031e4 400031e0: 82 10 60 08 or %g1, 8, %g1 fcntl_flags |= O_APPEND; } return fcntl_flags; } 400031e4: 81 c3 e0 08 retl 400031e8: 90 10 00 01 mov %g1, %o0 } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { 400031ec: 83 32 20 02 srl %o0, 2, %g1 <== NOT EXECUTED 400031f0: 10 bf ff f6 b 400031c8 <== NOT EXECUTED 400031f4: 82 08 60 01 and %g1, 1, %g1 <== NOT EXECUTED =============================================================================== 40004ad8 : return (retval); } int rtems_mkdir(const char *path, mode_t mode) { 40004ad8: 9d e3 bf 30 save %sp, -208, %sp int success = 0; char *dup_path = strdup(path); 40004adc: 40 00 70 07 call 40020af8 40004ae0: 90 10 00 18 mov %i0, %o0 if (dup_path != NULL) { 40004ae4: b6 92 20 00 orcc %o0, 0, %i3 40004ae8: 02 80 00 7b be 40004cd4 40004aec: 01 00 00 00 nop if (p[0] == '/') /* Skip leading '/'. */ 40004af0: c2 0e c0 00 ldub [ %i3 ], %g1 40004af4: 83 28 60 18 sll %g1, 0x18, %g1 40004af8: 85 38 60 18 sra %g1, 0x18, %g2 40004afc: 80 a0 a0 2f cmp %g2, 0x2f 40004b00: 12 80 00 05 bne 40004b14 40004b04: ba 10 00 1b mov %i3, %i5 if (p[0] == '\0') 40004b08: c2 0e e0 01 ldub [ %i3 + 1 ], %g1 ++p; 40004b0c: ba 06 e0 01 add %i3, 1, %i5 40004b10: 83 28 60 18 sll %g1, 0x18, %g1 if (p[0] == '\0') 40004b14: 83 38 60 18 sra %g1, 0x18, %g1 40004b18: ba 07 60 01 inc %i5 *p = '/'; 40004b1c: b8 10 20 00 clr %i4 40004b20: 84 10 20 01 mov 1, %g2 40004b24: b4 10 20 2f mov 0x2f, %i2 } else if (!S_ISDIR(sb.st_mode)) { 40004b28: 21 00 00 3c sethi %hi(0xf000), %l0 if (p[0] == '\0') 40004b2c: 80 a0 60 00 cmp %g1, 0 40004b30: 02 80 00 19 be 40004b94 <== NEVER TAKEN 40004b34: 31 00 00 10 sethi %hi(0x4000), %i0 else if (p[0] != '/') 40004b38: 80 a0 60 2f cmp %g1, 0x2f 40004b3c: 12 80 00 10 bne 40004b7c 40004b40: 80 a0 a0 00 cmp %g2, 0 *p = '\0'; 40004b44: c0 2f 7f ff clrb [ %i5 + -1 ] if (first) { 40004b48: 12 80 00 5b bne 40004cb4 40004b4c: c2 0f 40 00 ldub [ %i5 ], %g1 if (last) 40004b50: 83 28 60 18 sll %g1, 0x18, %g1 40004b54: 80 a0 60 00 cmp %g1, 0 40004b58: 02 80 00 17 be 40004bb4 <== NEVER TAKEN 40004b5c: 92 10 21 ff mov 0x1ff, %o1 if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 40004b60: 7f ff fc 0f call 40003b9c 40004b64: 90 10 00 1b mov %i3, %o0 40004b68: 80 a2 20 00 cmp %o0, 0 40004b6c: 06 80 00 1f bl 40004be8 40004b70: a2 10 20 00 clr %l1 *p = '/'; 40004b74: f4 2f 7f ff stb %i2, [ %i5 + -1 ] 40004b78: 84 10 20 00 clr %g2 if (p[0] == '\0') 40004b7c: c2 0f 40 00 ldub [ %i5 ], %g1 40004b80: 83 28 60 18 sll %g1, 0x18, %g1 40004b84: 83 38 60 18 sra %g1, 0x18, %g1 40004b88: 80 a0 60 00 cmp %g1, 0 40004b8c: 12 bf ff eb bne 40004b38 40004b90: ba 07 60 01 inc %i5 if (first) { 40004b94: 80 a0 a0 00 cmp %g2, 0 40004b98: 02 80 00 07 be 40004bb4 40004b9c: 01 00 00 00 nop oumask = umask(0); 40004ba0: 40 00 03 7b call 4000598c 40004ba4: 90 10 20 00 clr %o0 ! 0 40004ba8: b8 10 00 08 mov %o0, %i4 (void)umask(numask); 40004bac: 40 00 03 78 call 4000598c 40004bb0: 90 0a 3f 3f and %o0, -193, %o0 (void)umask(oumask); 40004bb4: 40 00 03 76 call 4000598c 40004bb8: 90 10 00 1c mov %i4, %o0 if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 40004bbc: 92 10 00 19 mov %i1, %o1 40004bc0: 7f ff fb f7 call 40003b9c 40004bc4: 90 10 00 1b mov %i3, %o0 40004bc8: 80 a2 20 00 cmp %o0, 0 40004bcc: 06 80 00 07 bl 40004be8 40004bd0: a2 10 20 01 mov 1, %l1 40004bd4: b0 10 20 00 clr %i0 success = build(dup_path, mode); free(dup_path); 40004bd8: 7f ff fa d4 call 40003728 40004bdc: 90 10 00 1b mov %i3, %o0 } return success != 0 ? 0 : -1; 40004be0: 81 c7 e0 08 ret 40004be4: 81 e8 00 00 restore if (errno == EEXIST || errno == EISDIR) { 40004be8: 40 00 64 7b call 4001ddd4 <__errno> 40004bec: 01 00 00 00 nop 40004bf0: c2 02 00 00 ld [ %o0 ], %g1 40004bf4: 80 a0 60 11 cmp %g1, 0x11 40004bf8: 02 80 00 08 be 40004c18 40004bfc: 92 07 bf 98 add %fp, -104, %o1 40004c00: 40 00 64 75 call 4001ddd4 <__errno> 40004c04: 01 00 00 00 nop 40004c08: c2 02 00 00 ld [ %o0 ], %g1 40004c0c: 80 a0 60 15 cmp %g1, 0x15 40004c10: 12 80 00 0f bne 40004c4c <== ALWAYS TAKEN 40004c14: 92 07 bf 98 add %fp, -104, %o1 if (stat(path, &sb) < 0) { 40004c18: 40 00 00 3d call 40004d0c 40004c1c: 90 10 00 1b mov %i3, %o0 40004c20: 80 a2 20 00 cmp %o0, 0 40004c24: 06 80 00 0a bl 40004c4c <== NEVER TAKEN 40004c28: c2 07 bf a8 ld [ %fp + -88 ], %g1 } else if (!S_ISDIR(sb.st_mode)) { 40004c2c: 82 08 40 10 and %g1, %l0, %g1 40004c30: 80 a0 40 18 cmp %g1, %i0 40004c34: 12 80 00 10 bne 40004c74 40004c38: 80 a4 60 00 cmp %l1, 0 if (last) 40004c3c: 32 bf ff e7 bne,a 40004bd8 40004c40: b0 10 20 00 clr %i0 40004c44: 10 bf ff cd b 40004b78 40004c48: f4 2f 7f ff stb %i2, [ %i5 + -1 ] if (!first && !last) 40004c4c: 80 a4 60 00 cmp %l1, 0 40004c50: 32 80 00 15 bne,a 40004ca4 <== ALWAYS TAKEN 40004c54: b0 10 3f ff mov -1, %i0 (void)umask(oumask); 40004c58: 40 00 03 4d call 4000598c 40004c5c: 90 10 00 1c mov %i4, %o0 40004c60: b0 10 3f ff mov -1, %i0 free(dup_path); 40004c64: 7f ff fa b1 call 40003728 40004c68: 90 10 00 1b mov %i3, %o0 return success != 0 ? 0 : -1; 40004c6c: 81 c7 e0 08 ret 40004c70: 81 e8 00 00 restore if (last) 40004c74: 02 80 00 07 be 40004c90 40004c78: 01 00 00 00 nop errno = EEXIST; 40004c7c: 40 00 64 56 call 4001ddd4 <__errno> 40004c80: b0 10 3f ff mov -1, %i0 ! ffffffff 40004c84: 82 10 20 11 mov 0x11, %g1 40004c88: 10 bf ff d4 b 40004bd8 40004c8c: c2 22 00 00 st %g1, [ %o0 ] errno = ENOTDIR; 40004c90: 40 00 64 51 call 4001ddd4 <__errno> 40004c94: 01 00 00 00 nop 40004c98: 82 10 20 14 mov 0x14, %g1 ! 14 <_TLS_Alignment+0x13> 40004c9c: 10 bf ff ef b 40004c58 40004ca0: c2 22 00 00 st %g1, [ %o0 ] free(dup_path); 40004ca4: 7f ff fa a1 call 40003728 40004ca8: 90 10 00 1b mov %i3, %o0 } 40004cac: 81 c7 e0 08 ret 40004cb0: 81 e8 00 00 restore oumask = umask(0); 40004cb4: c2 2f bf 97 stb %g1, [ %fp + -105 ] 40004cb8: 40 00 03 35 call 4000598c 40004cbc: 90 10 20 00 clr %o0 40004cc0: b8 10 00 08 mov %o0, %i4 (void)umask(numask); 40004cc4: 40 00 03 32 call 4000598c 40004cc8: 90 0a 3f 3f and %o0, -193, %o0 40004ccc: 10 bf ff a1 b 40004b50 40004cd0: c2 0f bf 97 ldub [ %fp + -105 ], %g1 return success != 0 ? 0 : -1; 40004cd4: 81 c7 e0 08 ret 40004cd8: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 400040dc : } void rtems_print_printer_printf(rtems_printer *printer) { printer->context = NULL; printer->printer = rtems_printf_plugin; 400040dc: 03 10 00 10 sethi %hi(0x40004000), %g1 <== NOT EXECUTED printer->context = NULL; 400040e0: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED printer->printer = rtems_printf_plugin; 400040e4: 82 10 60 c8 or %g1, 0xc8, %g1 <== NOT EXECUTED } 400040e8: 81 c3 e0 08 retl <== NOT EXECUTED 400040ec: c2 22 20 04 st %g1, [ %o0 + 4 ] <== NOT EXECUTED =============================================================================== 40002010 : int rtems_printf( const rtems_printer *printer, const char *format, ... ) { 40002010: 9d e3 bf 98 save %sp, -104, %sp int len = 0; if ( rtems_print_printer_valid( printer ) ) { va_list ap; va_start( ap, format ); 40002014: f4 27 a0 4c st %i2, [ %fp + 0x4c ] { 40002018: 82 10 00 18 mov %i0, %g1 va_start( ap, format ); 4000201c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] int len = 0; 40002020: b0 10 20 00 clr %i0 va_start( ap, format ); 40002024: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40002028: 80 a0 60 00 cmp %g1, 0 4000202c: 02 80 00 0b be 40002058 40002030: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 40002034: c4 00 60 04 ld [ %g1 + 4 ], %g2 40002038: 80 a0 a0 00 cmp %g2, 0 4000203c: 02 80 00 07 be 40002058 <== NEVER TAKEN 40002040: 94 07 a0 4c add %fp, 0x4c, %o2 len = printer->printer( printer->context, format, ap ); 40002044: d0 00 40 00 ld [ %g1 ], %o0 40002048: 92 10 00 19 mov %i1, %o1 4000204c: 9f c0 80 00 call %g2 40002050: d4 27 bf fc st %o2, [ %fp + -4 ] 40002054: b0 10 00 08 mov %o0, %i0 va_end( ap ); } return len; } 40002058: 81 c7 e0 08 ret 4000205c: 81 e8 00 00 restore =============================================================================== 4000490c : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 4000490c: 05 00 00 04 sethi %hi(0x1000), %g2 40004910: 84 10 a2 c0 or %g2, 0x2c0, %g2 ! 12c0 <_ISR_Stack_size+0x2c0> 40004914: 80 a2 00 02 cmp %o0, %g2 40004918: 02 80 00 81 be 40004b1c 4000491c: 82 10 00 08 mov %o0, %g1 40004920: 38 80 00 12 bgu,a 40004968 40004924: 05 00 00 38 sethi %hi(0xe000), %g2 40004928: 80 a2 20 c8 cmp %o0, 0xc8 4000492c: 02 80 00 78 be 40004b0c 40004930: 01 00 00 00 nop 40004934: 08 80 00 4e bleu 40004a6c 40004938: 80 a2 24 b0 cmp %o0, 0x4b0 4000493c: 02 80 00 6c be 40004aec 40004940: 01 00 00 00 nop 40004944: 08 80 00 42 bleu 40004a4c 40004948: 80 a0 67 08 cmp %g1, 0x708 4000494c: 02 80 00 21 be 400049d0 40004950: 90 10 20 0a mov 0xa, %o0 40004954: 80 a0 69 60 cmp %g1, 0x960 40004958: 12 80 00 73 bne 40004b24 <== NEVER TAKEN 4000495c: 01 00 00 00 nop case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; 40004960: 81 c3 e0 08 retl 40004964: 90 10 20 0b mov 0xb, %o0 ! b <_TLS_Alignment+0xa> switch (termios_baud) { 40004968: 84 10 a1 00 or %g2, 0x100, %g2 4000496c: 80 a2 00 02 cmp %o0, %g2 40004970: 02 80 00 69 be 40004b14 40004974: 01 00 00 00 nop 40004978: 08 80 00 23 bleu 40004a04 4000497c: 05 00 00 e1 sethi %hi(0x38400), %g2 40004980: 80 a2 00 02 cmp %o0, %g2 40004984: 02 80 00 5c be 40004af4 40004988: 01 00 00 00 nop 4000498c: 08 80 00 13 bleu 400049d8 40004990: 05 00 01 c2 sethi %hi(0x70800), %g2 40004994: 80 a0 40 02 cmp %g1, %g2 40004998: 02 80 00 0e be 400049d0 4000499c: 90 10 20 17 mov 0x17, %o0 400049a0: 05 00 03 84 sethi %hi(0xe1000), %g2 400049a4: 80 a0 40 02 cmp %g1, %g2 400049a8: 12 80 00 5f bne 40004b24 400049ac: 01 00 00 00 nop case B57600: baud_index = 19; break; case B76800: baud_index = 20; break; case B115200: baud_index = 21; break; case B230400: baud_index = 22; break; case B460800: baud_index = 23; break; case B921600: baud_index = 24; break; 400049b0: 81 c3 e0 08 retl 400049b4: 90 10 20 18 mov 0x18, %o0 ! 18 <_TLS_Alignment+0x17> switch (termios_baud) { 400049b8: 80 a0 60 32 cmp %g1, 0x32 400049bc: 02 80 00 05 be 400049d0 400049c0: 90 10 20 01 mov 1, %o0 400049c4: 80 a0 60 4b cmp %g1, 0x4b 400049c8: 12 80 00 46 bne 40004ae0 400049cc: 90 10 20 02 mov 2, %o0 default: baud_index = -1; break; } return baud_index; } 400049d0: 81 c3 e0 08 retl 400049d4: 01 00 00 00 nop switch (termios_baud) { 400049d8: 05 00 00 4b sethi %hi(0x12c00), %g2 400049dc: 80 a0 40 02 cmp %g1, %g2 400049e0: 02 bf ff fc be 400049d0 400049e4: 90 10 20 14 mov 0x14, %o0 400049e8: 05 00 00 70 sethi %hi(0x1c000), %g2 400049ec: 84 10 a2 00 or %g2, 0x200, %g2 ! 1c200 <_ISR_Stack_size+0x1b200> 400049f0: 80 a0 40 02 cmp %g1, %g2 400049f4: 12 80 00 4c bne 40004b24 <== NEVER TAKEN 400049f8: 01 00 00 00 nop case B115200: baud_index = 21; break; 400049fc: 81 c3 e0 08 retl 40004a00: 90 10 20 15 mov 0x15, %o0 ! 15 <_TLS_Alignment+0x14> switch (termios_baud) { 40004a04: 05 00 00 12 sethi %hi(0x4800), %g2 40004a08: 84 10 a3 00 or %g2, 0x300, %g2 ! 4b00 <_ISR_Stack_size+0x3b00> 40004a0c: 80 a2 00 02 cmp %o0, %g2 40004a10: 02 80 00 3d be 40004b04 40004a14: 01 00 00 00 nop 40004a18: 08 80 00 21 bleu 40004a9c 40004a1c: 05 00 00 1c sethi %hi(0x7000), %g2 40004a20: 84 10 a0 80 or %g2, 0x80, %g2 ! 7080 <_ISR_Stack_size+0x6080> 40004a24: 80 a0 40 02 cmp %g1, %g2 40004a28: 02 bf ff ea be 400049d0 40004a2c: 90 10 20 12 mov 0x12, %o0 40004a30: 05 00 00 25 sethi %hi(0x9400), %g2 40004a34: 84 10 a2 00 or %g2, 0x200, %g2 ! 9600 <_ISR_Stack_size+0x8600> 40004a38: 80 a0 40 02 cmp %g1, %g2 40004a3c: 12 80 00 3a bne 40004b24 <== NEVER TAKEN 40004a40: 01 00 00 00 nop case B38400: baud_index = 15; break; 40004a44: 81 c3 e0 08 retl 40004a48: 90 10 20 0f mov 0xf, %o0 ! f <_TLS_Alignment+0xe> switch (termios_baud) { 40004a4c: 80 a0 61 2c cmp %g1, 0x12c 40004a50: 02 bf ff e0 be 400049d0 40004a54: 90 10 20 07 mov 7, %o0 40004a58: 80 a0 62 58 cmp %g1, 0x258 40004a5c: 12 80 00 32 bne 40004b24 <== NEVER TAKEN 40004a60: 01 00 00 00 nop case B600: baud_index = 8; break; 40004a64: 81 c3 e0 08 retl 40004a68: 90 10 20 08 mov 8, %o0 ! 8 <_TLS_Alignment+0x7> switch (termios_baud) { 40004a6c: 80 a2 20 6e cmp %o0, 0x6e 40004a70: 02 80 00 23 be 40004afc 40004a74: 01 00 00 00 nop 40004a78: 08 bf ff d0 bleu 400049b8 40004a7c: 80 a0 60 86 cmp %g1, 0x86 40004a80: 02 bf ff d4 be 400049d0 40004a84: 90 10 20 04 mov 4, %o0 40004a88: 80 a0 60 96 cmp %g1, 0x96 40004a8c: 12 80 00 26 bne 40004b24 <== NEVER TAKEN 40004a90: 01 00 00 00 nop case B150: baud_index = 5; break; 40004a94: 81 c3 e0 08 retl 40004a98: 90 10 20 05 mov 5, %o0 ! 5 <_TLS_Alignment+0x4> switch (termios_baud) { 40004a9c: 05 00 00 09 sethi %hi(0x2400), %g2 40004aa0: 84 10 a1 80 or %g2, 0x180, %g2 ! 2580 <_ISR_Stack_size+0x1580> 40004aa4: 80 a0 40 02 cmp %g1, %g2 40004aa8: 02 bf ff ca be 400049d0 40004aac: 90 10 20 0d mov 0xd, %o0 40004ab0: 05 00 00 0e sethi %hi(0x3800), %g2 40004ab4: 84 10 a0 40 or %g2, 0x40, %g2 ! 3840 <_ISR_Stack_size+0x2840> 40004ab8: 80 a0 40 02 cmp %g1, %g2 40004abc: 02 bf ff c5 be 400049d0 40004ac0: 90 10 20 11 mov 0x11, %o0 40004ac4: 05 00 00 07 sethi %hi(0x1c00), %g2 40004ac8: 84 10 a0 20 or %g2, 0x20, %g2 ! 1c20 <_ISR_Stack_size+0xc20> 40004acc: 80 a0 40 02 cmp %g1, %g2 40004ad0: 12 80 00 15 bne 40004b24 <== NEVER TAKEN 40004ad4: 01 00 00 00 nop case B7200: baud_index = 16; break; 40004ad8: 81 c3 e0 08 retl 40004adc: 90 10 20 10 mov 0x10, %o0 ! 10 <_TLS_Alignment+0xf> switch (termios_baud) { 40004ae0: 80 a0 00 01 cmp %g0, %g1 40004ae4: 81 c3 e0 08 retl 40004ae8: 90 60 20 00 subx %g0, 0, %o0 case B1200: baud_index = 9; break; 40004aec: 81 c3 e0 08 retl 40004af0: 90 10 20 09 mov 9, %o0 case B230400: baud_index = 22; break; 40004af4: 81 c3 e0 08 retl 40004af8: 90 10 20 16 mov 0x16, %o0 case B110: baud_index = 3; break; 40004afc: 81 c3 e0 08 retl 40004b00: 90 10 20 03 mov 3, %o0 case B19200: baud_index = 14; break; 40004b04: 81 c3 e0 08 retl 40004b08: 90 10 20 0e mov 0xe, %o0 case B200: baud_index = 6; break; 40004b0c: 81 c3 e0 08 retl 40004b10: 90 10 20 06 mov 6, %o0 case B57600: baud_index = 19; break; 40004b14: 81 c3 e0 08 retl 40004b18: 90 10 20 13 mov 0x13, %o0 case B4800: baud_index = 12; break; 40004b1c: 81 c3 e0 08 retl 40004b20: 90 10 20 0c mov 0xc, %o0 } 40004b24: 81 c3 e0 08 retl 40004b28: 90 10 3f ff mov -1, %o0 =============================================================================== 40004ce0 : { 40004ce0: 9d e3 bf a0 save %sp, -96, %sp struct rtems_termios_tty *tty = args->iop->data1; 40004ce4: c2 06 00 00 ld [ %i0 ], %g1 40004ce8: fa 00 60 2c ld [ %g1 + 0x2c ], %i5 _Mutex_Acquire( mutex ); 40004cec: 39 10 00 75 sethi %hi(0x4001d400), %i4 40004cf0: 40 00 10 f1 call 400090b4 <_Mutex_Acquire> 40004cf4: 90 17 21 10 or %i4, 0x110, %o0 ! 4001d510 if (tty->refcount == 1) { 40004cf8: c2 07 60 08 ld [ %i5 + 8 ], %g1 40004cfc: 80 a0 60 01 cmp %g1, 1 40004d00: 22 80 00 0b be,a 40004d2c <== ALWAYS TAKEN 40004d04: c4 07 40 00 ld [ %i5 ], %g2 if (--tty->refcount == 0) { 40004d08: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40004d0c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004d10: 02 80 00 0f be 40004d4c <== NOT EXECUTED 40004d14: c2 27 60 08 st %g1, [ %i5 + 8 ] <== NOT EXECUTED _Mutex_Release( mutex ); 40004d18: 90 17 21 10 or %i4, 0x110, %o0 <== NOT EXECUTED 40004d1c: 40 00 11 01 call 40009120 <_Mutex_Release> <== NOT EXECUTED 40004d20: b0 10 20 00 clr %i0 <== NOT EXECUTED } 40004d24: 81 c7 e0 08 ret <== NOT EXECUTED 40004d28: 81 e8 00 00 restore <== NOT EXECUTED if (tty->forw == NULL) { 40004d2c: 80 a0 a0 00 cmp %g2, 0 40004d30: 02 80 00 13 be 40004d7c <== ALWAYS TAKEN 40004d34: c2 07 60 04 ld [ %i5 + 4 ], %g1 if (tty->back == NULL) { 40004d38: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004d3c: 02 80 00 0d be 40004d70 <== NOT EXECUTED 40004d40: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED tty->back->forw = tty->forw; 40004d44: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED if (--tty->refcount == 0) { 40004d48: c0 27 60 08 clr [ %i5 + 8 ] rtems_termios_destroy_tty (tty, arg, true); 40004d4c: 92 10 00 18 mov %i0, %o1 40004d50: 94 10 20 01 mov 1, %o2 40004d54: 7f ff f9 3c call 40003244 40004d58: 90 10 00 1d mov %i5, %o0 40004d5c: 90 17 21 10 or %i4, 0x110, %o0 40004d60: 40 00 10 f0 call 40009120 <_Mutex_Release> 40004d64: b0 10 20 00 clr %i0 } 40004d68: 81 c7 e0 08 ret 40004d6c: 81 e8 00 00 restore rtems_termios_ttyHead = tty->forw; 40004d70: 03 10 00 7d sethi %hi(0x4001f400), %g1 <== NOT EXECUTED 40004d74: 10 bf ff f5 b 40004d48 <== NOT EXECUTED 40004d78: c4 20 61 a4 st %g2, [ %g1 + 0x1a4 ] ! 4001f5a4 <== NOT EXECUTED rtems_termios_ttyTail = tty->back; 40004d7c: 05 10 00 7d sethi %hi(0x4001f400), %g2 if ( rtems_termios_ttyTail != NULL ) { 40004d80: 80 a0 60 00 cmp %g1, 0 40004d84: 02 80 00 06 be 40004d9c <== ALWAYS TAKEN 40004d88: c2 20 a1 a0 st %g1, [ %g2 + 0x1a0 ] rtems_termios_ttyTail->forw = NULL; 40004d8c: c0 20 40 00 clr [ %g1 ] <== NOT EXECUTED tty->back->forw = tty->forw; 40004d90: c4 07 40 00 ld [ %i5 ], %g2 <== NOT EXECUTED 40004d94: 10 bf ff ed b 40004d48 <== NOT EXECUTED 40004d98: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED rtems_termios_ttyHead = tty->forw; 40004d9c: 03 10 00 7d sethi %hi(0x4001f400), %g1 40004da0: 10 bf ff ea b 40004d48 40004da4: c0 20 61 a4 clr [ %g1 + 0x1a4 ] ! 4001f5a4 =============================================================================== 40005994 : { 40005994: 9d e3 bf a0 save %sp, -96, %sp tty->t_dqlen += len; 40005998: c2 06 20 e0 ld [ %i0 + 0xe0 ], %g1 4000599c: b2 00 40 19 add %g1, %i1, %i1 400059a0: f2 26 20 e0 st %i1, [ %i0 + 0xe0 ] if (tty->handler.mode == TERMIOS_TASK_DRIVEN) { 400059a4: c2 06 21 3c ld [ %i0 + 0x13c ], %g1 400059a8: 80 a0 60 02 cmp %g1, 2 400059ac: 02 80 00 10 be 400059ec 400059b0: 90 10 00 18 mov %i0, %o0 if (tty->t_line == PPPDISC ) { 400059b4: c2 06 21 5c ld [ %i0 + 0x15c ], %g1 400059b8: 80 a0 60 05 cmp %g1, 5 400059bc: 02 80 00 04 be 400059cc 400059c0: 03 10 00 7d sethi %hi(0x4001f400), %g1 return rtems_termios_refill_transmitter(tty); 400059c4: 7f ff f7 ba call 400038ac 400059c8: 81 e8 00 00 restore if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 400059cc: c2 00 62 5c ld [ %g1 + 0x25c ], %g1 400059d0: 80 a0 60 00 cmp %g1, 0 400059d4: 02 80 00 04 be 400059e4 <== NEVER TAKEN 400059d8: 01 00 00 00 nop rtems_termios_linesw[tty->t_line].l_start(tty); 400059dc: 9f c0 40 00 call %g1 400059e0: 01 00 00 00 nop } 400059e4: 81 c7 e0 08 ret 400059e8: 91 e8 20 00 restore %g0, 0, %o0 sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); 400059ec: d0 06 21 58 ld [ %i0 + 0x158 ], %o0 400059f0: 40 00 08 d7 call 40007d4c 400059f4: 92 10 20 02 mov 2, %o1 if (sc != RTEMS_SUCCESSFUL) 400059f8: 80 a2 20 00 cmp %o0, 0 400059fc: 02 bf ff fa be 400059e4 <== ALWAYS TAKEN 40005a00: 01 00 00 00 nop rtems_fatal_error_occurred (sc); 40005a04: 40 00 0a d8 call 40008564 <== NOT EXECUTED 40005a08: 01 00 00 00 nop <== NOT EXECUTED 40005a0c: 01 00 00 00 nop <== NOT EXECUTED =============================================================================== 4001196c : { 4001196c: 9d e3 bf 98 save %sp, -104, %sp if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 40011970: c2 06 21 5c ld [ %i0 + 0x15c ], %g1 40011974: 83 28 60 05 sll %g1, 5, %g1 40011978: 39 10 00 6c sethi %hi(0x4001b000), %i4 4001197c: b8 17 23 b8 or %i4, 0x3b8, %i4 ! 4001b3b8 40011980: 82 07 00 01 add %i4, %g1, %g1 40011984: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 40011988: 80 a0 60 00 cmp %g1, 0 4001198c: 02 80 00 37 be 40011a68 40011990: ba 10 00 18 mov %i0, %i5 while (len--) { 40011994: 80 a6 a0 00 cmp %i2, 0 40011998: 22 80 00 10 be,a 400119d8 <== NEVER TAKEN 4001199c: c2 07 61 6c ld [ %i5 + 0x16c ], %g1 <== NOT EXECUTED 400119a0: b4 06 bf ff add %i2, -1, %i2 400119a4: 10 80 00 06 b 400119bc 400119a8: b4 06 40 1a add %i1, %i2, %i2 rtems_termios_linesw[tty->t_line].l_rint(c,tty); 400119ac: 83 28 60 05 sll %g1, 5, %g1 400119b0: 82 07 00 01 add %i4, %g1, %g1 400119b4: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 400119b8: b2 06 60 01 inc %i1 400119bc: d0 4e 40 00 ldsb [ %i1 ], %o0 400119c0: 9f c0 40 00 call %g1 400119c4: 92 10 00 1d mov %i5, %o1 while (len--) { 400119c8: 80 a6 40 1a cmp %i1, %i2 400119cc: 32 bf ff f8 bne,a 400119ac 400119d0: c2 07 61 5c ld [ %i5 + 0x15c ], %g1 if (tty->tty_rcv.sw_pfn != NULL && !tty->tty_rcvwakeup) { 400119d4: c2 07 61 6c ld [ %i5 + 0x16c ], %g1 400119d8: 80 a0 60 00 cmp %g1, 0 400119dc: 02 80 00 0a be 40011a04 400119e0: b0 10 20 00 clr %i0 400119e4: c4 0f 61 74 ldub [ %i5 + 0x174 ], %g2 400119e8: 80 a0 a0 00 cmp %g2, 0 400119ec: 12 80 00 06 bne 40011a04 <== NEVER TAKEN 400119f0: 84 10 20 01 mov 1, %g2 tty->tty_rcvwakeup = true; 400119f4: c4 2f 61 74 stb %g2, [ %i5 + 0x174 ] (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 400119f8: 90 07 60 50 add %i5, 0x50, %o0 400119fc: 9f c0 40 00 call %g1 40011a00: d2 07 61 70 ld [ %i5 + 0x170 ], %o1 40011a04: 81 c7 e0 08 ret 40011a08: 81 e8 00 00 restore if (c == tty->termios.c_cc[VSTART]) { 40011a0c: 80 a0 40 03 cmp %g1, %g3 tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 40011a10: c2 07 61 48 ld [ %i5 + 0x148 ], %g1 if (c == tty->termios.c_cc[VSTART]) { 40011a14: 22 80 00 c0 be,a 40011d14 <== NEVER TAKEN 40011a18: 82 18 60 10 xor %g1, 0x10, %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ORCVXOF; 40011a1c: 82 10 60 10 or %g1, 0x10, %g1 40011a20: c2 27 61 48 st %g1, [ %i5 + 0x148 ] if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 40011a24: a6 10 20 01 mov 1, %l3 40011a28: c2 07 61 48 ld [ %i5 + 0x148 ], %g1 40011a2c: 82 08 60 30 and %g1, 0x30, %g1 40011a30: 80 a0 60 20 cmp %g1, 0x20 40011a34: 02 80 00 7a be 40011c1c <== NEVER TAKEN 40011a38: 82 27 00 1a sub %i4, %i2, %g1 while (len--) { 40011a3c: 80 a0 40 19 cmp %g1, %i1 40011a40: 12 80 00 15 bne 40011a94 <== NEVER TAKEN 40011a44: 01 00 00 00 nop tty->rawInBufDropped += dropped; 40011a48: 84 10 00 18 mov %i0, %g2 40011a4c: c2 07 60 b4 ld [ %i5 + 0xb4 ], %g1 40011a50: 82 00 40 02 add %g1, %g2, %g1 40011a54: c2 27 60 b4 st %g1, [ %i5 + 0xb4 ] _Semaphore_Post_binary( &binary_semaphore->Semaphore ); 40011a58: 40 00 02 bb call 40012544 <_Semaphore_Post_binary> 40011a5c: 90 07 60 90 add %i5, 0x90, %o0 } 40011a60: 81 c7 e0 08 ret 40011a64: 81 e8 00 00 restore int dropped = 0; 40011a68: b0 10 20 00 clr %i0 while (len--) { 40011a6c: 80 a6 a0 00 cmp %i2, 0 40011a70: 02 bf ff f7 be 40011a4c <== NEVER TAKEN 40011a74: 84 10 20 00 clr %g2 rtems_termios_device_context *ctx = tty->device_context; 40011a78: e8 07 61 7c ld [ %i5 + 0x17c ], %l4 40011a7c: b8 10 00 19 mov %i1, %i4 bool flow_rcv = false; /* true, if flow control char received */ 40011a80: a6 10 20 00 clr %l3 int dropped = 0; 40011a84: b0 10 20 00 clr %i0 40011a88: a2 10 20 01 mov 1, %l1 (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 40011a8c: a0 07 60 50 add %i5, 0x50, %l0 (void *)&(tty->termios.c_cc[VSTOP]), 1); 40011a90: a4 07 60 6d add %i5, 0x6d, %l2 if (tty->flow_ctrl & FL_MDXON) { 40011a94: c2 07 61 48 ld [ %i5 + 0x148 ], %g1 c = *buf++; 40011a98: b8 07 20 01 inc %i4 if (tty->flow_ctrl & FL_MDXON) { 40011a9c: 80 88 62 00 btst 0x200, %g1 40011aa0: 02 80 00 0b be 40011acc 40011aa4: d0 0f 3f ff ldub [ %i4 + -1 ], %o0 if (c == tty->termios.c_cc[VSTOP]) { 40011aa8: c4 0f 60 6d ldub [ %i5 + 0x6d ], %g2 40011aac: 83 2a 20 18 sll %o0, 0x18, %g1 40011ab0: 83 38 60 18 sra %g1, 0x18, %g1 40011ab4: 80 a0 40 02 cmp %g1, %g2 40011ab8: 02 bf ff d5 be 40011a0c 40011abc: c6 0f 60 6c ldub [ %i5 + 0x6c ], %g3 else if (c == tty->termios.c_cc[VSTART]) { 40011ac0: 80 a0 40 03 cmp %g1, %g3 40011ac4: 02 80 00 74 be 40011c94 <== NEVER TAKEN 40011ac8: 01 00 00 00 nop if (flow_rcv) { 40011acc: 80 8c e0 ff btst 0xff, %l3 40011ad0: 32 bf ff d6 bne,a 40011a28 <== NEVER TAKEN 40011ad4: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED if (c == '\r' && (tty->termios.c_iflag & IGNCR) != 0) { 40011ad8: 83 2a 20 18 sll %o0, 0x18, %g1 40011adc: 83 38 60 18 sra %g1, 0x18, %g1 40011ae0: 80 a0 60 0d cmp %g1, 0xd 40011ae4: 22 80 00 67 be,a 40011c80 40011ae8: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 c = iprocEarly (c, tty); 40011aec: 92 10 00 1d mov %i5, %o1 40011af0: 7f ff f6 87 call 4000f50c 40011af4: 90 0a 20 ff and %o0, 0xff, %o0 ( *context->lock_acquire )( context, lock_context ); 40011af8: c2 05 20 14 ld [ %l4 + 0x14 ], %g1 40011afc: aa 10 00 08 mov %o0, %l5 40011b00: 92 07 bf fc add %fp, -4, %o1 40011b04: 9f c0 40 00 call %g1 40011b08: 90 10 00 14 mov %l4, %o0 head = tty->rawInBuf.Head; 40011b0c: ec 07 60 84 ld [ %i5 + 0x84 ], %l6 oldTail = tty->rawInBuf.Tail; 40011b10: f6 07 60 88 ld [ %i5 + 0x88 ], %i3 newTail = (oldTail + 1) % tty->rawInBuf.Size; 40011b14: c4 07 60 8c ld [ %i5 + 0x8c ], %g2 if ((tty->flow_ctrl & FL_IREQXOF) != 0 && (((newTail - head) % 40011b18: c2 07 61 48 ld [ %i5 + 0x148 ], %g1 newTail = (oldTail + 1) % tty->rawInBuf.Size; 40011b1c: b6 06 e0 01 inc %i3 if ((tty->flow_ctrl & FL_IREQXOF) != 0 && (((newTail - head) % 40011b20: 80 88 60 01 btst 1, %g1 newTail = (oldTail + 1) % tty->rawInBuf.Size; 40011b24: 81 80 20 00 wr %g0, %y 40011b28: 01 00 00 00 nop 40011b2c: 01 00 00 00 nop 40011b30: 01 00 00 00 nop 40011b34: 82 76 c0 02 udiv %i3, %g2, %g1 40011b38: 82 58 40 02 smul %g1, %g2, %g1 if ((tty->flow_ctrl & FL_IREQXOF) != 0 && (((newTail - head) % 40011b3c: 02 80 00 25 be 40011bd0 <== ALWAYS TAKEN 40011b40: b6 26 c0 01 sub %i3, %g1, %i3 tty->rawInBuf.Size) > tty->highwater)) { 40011b44: c6 07 60 8c ld [ %i5 + 0x8c ], %g3 <== NOT EXECUTED if ((tty->flow_ctrl & FL_IREQXOF) != 0 && (((newTail - head) % 40011b48: c8 07 61 50 ld [ %i5 + 0x150 ], %g4 <== NOT EXECUTED 40011b4c: 82 26 c0 16 sub %i3, %l6, %g1 <== NOT EXECUTED 40011b50: 81 80 20 00 wr %g0, %y <== NOT EXECUTED 40011b54: 01 00 00 00 nop <== NOT EXECUTED 40011b58: 01 00 00 00 nop <== NOT EXECUTED 40011b5c: 01 00 00 00 nop <== NOT EXECUTED 40011b60: 84 70 40 03 udiv %g1, %g3, %g2 <== NOT EXECUTED 40011b64: 84 58 80 03 smul %g2, %g3, %g2 <== NOT EXECUTED 40011b68: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 40011b6c: 80 a0 40 04 cmp %g1, %g4 <== NOT EXECUTED 40011b70: 08 80 00 19 bleu 40011bd4 <== NOT EXECUTED 40011b74: 80 a5 80 1b cmp %l6, %i3 <== NOT EXECUTED tty->flow_ctrl |= FL_IREQXOF; 40011b78: c2 07 61 48 ld [ %i5 + 0x148 ], %g1 <== NOT EXECUTED 40011b7c: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 40011b80: c2 27 61 48 st %g1, [ %i5 + 0x148 ] <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 40011b84: c2 07 61 48 ld [ %i5 + 0x148 ], %g1 <== NOT EXECUTED 40011b88: 82 08 64 02 and %g1, 0x402, %g1 <== NOT EXECUTED 40011b8c: 80 a0 64 00 cmp %g1, 0x400 <== NOT EXECUTED if ((tty->flow_ctrl & FL_OSTOP) || 40011b90: c2 07 61 48 ld [ %i5 + 0x148 ], %g1 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 40011b94: 02 80 00 63 be 40011d20 <== NOT EXECUTED 40011b98: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) { 40011b9c: 82 08 61 04 and %g1, 0x104, %g1 <== NOT EXECUTED 40011ba0: 80 a0 61 00 cmp %g1, 0x100 <== NOT EXECUTED 40011ba4: 12 80 00 0c bne 40011bd4 <== NOT EXECUTED 40011ba8: 80 a5 80 1b cmp %l6, %i3 <== NOT EXECUTED tty->flow_ctrl |= FL_IRTSOFF; 40011bac: c2 07 61 48 ld [ %i5 + 0x148 ], %g1 <== NOT EXECUTED 40011bb0: 82 10 60 04 or %g1, 4, %g1 <== NOT EXECUTED 40011bb4: c2 27 61 48 st %g1, [ %i5 + 0x148 ] <== NOT EXECUTED if (tty->flow.stop_remote_tx != NULL) { 40011bb8: c2 07 61 40 ld [ %i5 + 0x140 ], %g1 <== NOT EXECUTED 40011bbc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011bc0: 02 80 00 05 be 40011bd4 <== NOT EXECUTED 40011bc4: 80 a5 80 1b cmp %l6, %i3 <== NOT EXECUTED tty->flow.stop_remote_tx(ctx); 40011bc8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40011bcc: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED if (newTail != head) { 40011bd0: 80 a5 80 1b cmp %l6, %i3 40011bd4: 22 80 00 35 be,a 40011ca8 40011bd8: c4 07 61 6c ld [ %i5 + 0x16c ], %g2 tty->rawInBuf.theBuf[newTail] = c; 40011bdc: c2 07 60 80 ld [ %i5 + 0x80 ], %g1 40011be0: ea 28 40 1b stb %l5, [ %g1 + %i3 ] tty->rawInBuf.Tail = newTail; 40011be4: f6 27 60 88 st %i3, [ %i5 + 0x88 ] if (tty->tty_rcv.sw_pfn != NULL && !tty->tty_rcvwakeup) { 40011be8: c2 07 61 6c ld [ %i5 + 0x16c ], %g1 40011bec: 80 a0 60 00 cmp %g1, 0 40011bf0: 22 80 00 44 be,a 40011d00 40011bf4: c2 05 20 18 ld [ %l4 + 0x18 ], %g1 40011bf8: c2 0f 61 74 ldub [ %i5 + 0x174 ], %g1 40011bfc: 80 88 60 ff btst 0xff, %g1 40011c00: 02 80 00 54 be 40011d50 40011c04: c4 05 20 18 ld [ %l4 + 0x18 ], %g2 ( *context->lock_release )( context, lock_context ); 40011c08: 92 07 bf fc add %fp, -4, %o1 40011c0c: 9f c0 80 00 call %g2 40011c10: 90 10 00 14 mov %l4, %o0 while (len--) { 40011c14: 10 bf ff 8a b 40011a3c 40011c18: 82 27 00 1a sub %i4, %i2, %g1 ( *context->lock_acquire )( context, lock_context ); 40011c1c: c2 05 20 14 ld [ %l4 + 0x14 ], %g1 <== NOT EXECUTED 40011c20: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED 40011c24: 9f c0 40 00 call %g1 <== NOT EXECUTED 40011c28: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 40011c2c: c2 07 61 48 ld [ %i5 + 0x148 ], %g1 <== NOT EXECUTED 40011c30: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED 40011c34: c2 27 61 48 st %g1, [ %i5 + 0x148 ] <== NOT EXECUTED if (tty->rawOutBufState != rob_idle) { 40011c38: c2 07 60 e4 ld [ %i5 + 0xe4 ], %g1 <== NOT EXECUTED 40011c3c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011c40: 22 80 00 0a be,a 40011c68 <== NOT EXECUTED 40011c44: c2 05 20 18 ld [ %l4 + 0x18 ], %g1 <== NOT EXECUTED ctx, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 40011c48: c4 07 60 c0 ld [ %i5 + 0xc0 ], %g2 <== NOT EXECUTED 40011c4c: d2 07 60 b8 ld [ %i5 + 0xb8 ], %o1 <== NOT EXECUTED (*tty->handler.write)( 40011c50: c2 07 61 30 ld [ %i5 + 0x130 ], %g1 <== NOT EXECUTED 40011c54: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40011c58: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED 40011c5c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40011c60: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED ( *context->lock_release )( context, lock_context ); 40011c64: c2 05 20 18 ld [ %l4 + 0x18 ], %g1 <== NOT EXECUTED 40011c68: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED 40011c6c: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED 40011c70: 9f c0 40 00 call %g1 <== NOT EXECUTED 40011c74: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED } 40011c78: 10 bf ff 71 b 40011a3c <== NOT EXECUTED 40011c7c: 82 27 00 1a sub %i4, %i2, %g1 <== NOT EXECUTED if (c == '\r' && (tty->termios.c_iflag & IGNCR) != 0) { 40011c80: 80 88 60 80 btst 0x80, %g1 40011c84: 02 bf ff 9b be 40011af0 40011c88: 92 10 00 1d mov %i5, %o1 40011c8c: 10 bf ff 6c b 40011a3c 40011c90: 82 27 00 1a sub %i4, %i2, %g1 tty->flow_ctrl &= ~FL_ORCVXOF; 40011c94: c2 07 61 48 ld [ %i5 + 0x148 ], %g1 <== NOT EXECUTED 40011c98: 82 08 7f ef and %g1, -17, %g1 <== NOT EXECUTED 40011c9c: c2 27 61 48 st %g1, [ %i5 + 0x148 ] <== NOT EXECUTED if (flow_rcv) { 40011ca0: 10 bf ff 62 b 40011a28 <== NOT EXECUTED 40011ca4: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED ( *context->lock_release )( context, lock_context ); 40011ca8: c2 05 20 18 ld [ %l4 + 0x18 ], %g1 if (tty->tty_rcv.sw_pfn != NULL && !tty->tty_rcvwakeup) { 40011cac: 80 a0 a0 00 cmp %g2, 0 40011cb0: 02 80 00 0f be 40011cec <== NEVER TAKEN 40011cb4: b0 06 20 01 inc %i0 40011cb8: c4 0f 61 74 ldub [ %i5 + 0x174 ], %g2 40011cbc: 80 a0 a0 00 cmp %g2, 0 40011cc0: 12 80 00 0c bne 40011cf0 <== NEVER TAKEN 40011cc4: 92 07 bf fc add %fp, -4, %o1 tty->tty_rcvwakeup = true; 40011cc8: e2 2f 61 74 stb %l1, [ %i5 + 0x174 ] 40011ccc: 9f c0 40 00 call %g1 40011cd0: 90 10 00 14 mov %l4, %o0 (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 40011cd4: c2 07 61 6c ld [ %i5 + 0x16c ], %g1 40011cd8: d2 07 61 70 ld [ %i5 + 0x170 ], %o1 40011cdc: 9f c0 40 00 call %g1 40011ce0: 90 10 00 10 mov %l0, %o0 while (len--) { 40011ce4: 10 bf ff 56 b 40011a3c 40011ce8: 82 27 00 1a sub %i4, %i2, %g1 40011cec: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED 40011cf0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40011cf4: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED 40011cf8: 10 bf ff 51 b 40011a3c <== NOT EXECUTED 40011cfc: 82 27 00 1a sub %i4, %i2, %g1 <== NOT EXECUTED 40011d00: 92 07 bf fc add %fp, -4, %o1 40011d04: 9f c0 40 00 call %g1 40011d08: 90 10 00 14 mov %l4, %o0 40011d0c: 10 bf ff 4c b 40011a3c 40011d10: 82 27 00 1a sub %i4, %i2, %g1 tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 40011d14: c2 27 61 48 st %g1, [ %i5 + 0x148 ] <== NOT EXECUTED 40011d18: 10 bf ff 44 b 40011a28 <== NOT EXECUTED 40011d1c: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED if ((tty->flow_ctrl & FL_OSTOP) || 40011d20: 22 80 00 37 be,a 40011dfc <== NOT EXECUTED 40011d24: c2 07 60 e4 ld [ %i5 + 0xe4 ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 40011d28: c2 07 61 48 ld [ %i5 + 0x148 ], %g1 <== NOT EXECUTED 40011d2c: 82 10 60 02 or %g1, 2, %g1 <== NOT EXECUTED 40011d30: c2 27 61 48 st %g1, [ %i5 + 0x148 ] <== NOT EXECUTED (*tty->handler.write)(ctx, 40011d34: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40011d38: c2 07 61 30 ld [ %i5 + 0x130 ], %g1 <== NOT EXECUTED 40011d3c: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 40011d40: 9f c0 40 00 call %g1 <== NOT EXECUTED 40011d44: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED if (newTail != head) { 40011d48: 10 bf ff a3 b 40011bd4 <== NOT EXECUTED 40011d4c: 80 a5 80 1b cmp %l6, %i3 <== NOT EXECUTED if ((tty->termios.c_lflag & ICANON) != 0) { 40011d50: c6 07 60 5c ld [ %i5 + 0x5c ], %g3 40011d54: 80 88 e1 00 btst 0x100, %g3 40011d58: 02 80 00 16 be 40011db0 40011d5c: 80 a5 60 0a cmp %l5, 0xa c == tty->termios.c_cc[VEOL] || c == tty->termios.c_cc[VEOL2]; 40011d60: 22 80 00 22 be,a 40011de8 40011d64: e2 2f 61 74 stb %l1, [ %i5 + 0x174 ] return c == '\n' || c == tty->termios.c_cc[VEOF] || 40011d68: c6 0f 60 60 ldub [ %i5 + 0x60 ], %g3 40011d6c: 80 a5 40 03 cmp %l5, %g3 40011d70: 22 80 00 1e be,a 40011de8 40011d74: e2 2f 61 74 stb %l1, [ %i5 + 0x174 ] 40011d78: c6 0f 60 61 ldub [ %i5 + 0x61 ], %g3 40011d7c: 80 a5 40 03 cmp %l5, %g3 40011d80: 22 80 00 1a be,a 40011de8 40011d84: e2 2f 61 74 stb %l1, [ %i5 + 0x174 ] if (mustCallReceiveCallback (tty, c, newTail, head)) { 40011d88: c6 0f 60 62 ldub [ %i5 + 0x62 ], %g3 40011d8c: 80 a5 40 03 cmp %l5, %g3 40011d90: 22 80 00 16 be,a 40011de8 40011d94: e2 2f 61 74 stb %l1, [ %i5 + 0x174 ] 40011d98: 92 07 bf fc add %fp, -4, %o1 40011d9c: 90 10 00 14 mov %l4, %o0 40011da0: 9f c0 80 00 call %g2 40011da4: a6 10 00 01 mov %g1, %l3 while (len--) { 40011da8: 10 bf ff 25 b 40011a3c 40011dac: 82 27 00 1a sub %i4, %i2, %g1 unsigned int rawContentSize = (newTail - head) % tty->rawInBuf.Size; 40011db0: c8 07 60 8c ld [ %i5 + 0x8c ], %g4 return rawContentSize >= tty->termios.c_cc[VMIN]; 40011db4: de 0f 60 70 ldub [ %i5 + 0x70 ], %o7 unsigned int rawContentSize = (newTail - head) % tty->rawInBuf.Size; 40011db8: b6 26 c0 16 sub %i3, %l6, %i3 40011dbc: 81 80 20 00 wr %g0, %y 40011dc0: 01 00 00 00 nop 40011dc4: 01 00 00 00 nop 40011dc8: 01 00 00 00 nop 40011dcc: 86 76 c0 04 udiv %i3, %g4, %g3 40011dd0: 86 58 c0 04 smul %g3, %g4, %g3 40011dd4: b6 26 c0 03 sub %i3, %g3, %i3 if (mustCallReceiveCallback (tty, c, newTail, head)) { 40011dd8: 80 a6 c0 0f cmp %i3, %o7 40011ddc: 0a bf ff f0 bcs 40011d9c 40011de0: 92 07 bf fc add %fp, -4, %o1 tty->tty_rcvwakeup = true; 40011de4: e2 2f 61 74 stb %l1, [ %i5 + 0x174 ] 40011de8: 92 07 bf fc add %fp, -4, %o1 40011dec: 9f c0 80 00 call %g2 40011df0: 90 10 00 14 mov %l4, %o0 (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 40011df4: 10 bf ff b9 b 40011cd8 40011df8: c2 07 61 6c ld [ %i5 + 0x16c ], %g1 if ((tty->flow_ctrl & FL_OSTOP) || 40011dfc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011e00: 32 bf ff 75 bne,a 40011bd4 <== NOT EXECUTED 40011e04: 80 a5 80 1b cmp %l6, %i3 <== NOT EXECUTED 40011e08: 30 bf ff c8 b,a 40011d28 <== NOT EXECUTED =============================================================================== 40011348 : { 40011348: 9d e3 bf 98 save %sp, -104, %sp struct rtems_termios_tty *tty = args->iop->data1; 4001134c: c2 06 00 00 ld [ %i0 ], %g1 40011350: f8 00 60 2c ld [ %g1 + 0x2c ], %i4 args->ioctl_return = 0; 40011354: c0 26 20 0c clr [ %i0 + 0xc ] rtems_mutex_lock (&tty->osem); 40011358: b4 07 20 28 add %i4, 0x28, %i2 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 4001135c: f2 06 20 08 ld [ %i0 + 8 ], %i1 _Mutex_Acquire( mutex ); 40011360: 7f ff d0 65 call 400054f4 <_Mutex_Acquire> 40011364: 90 10 00 1a mov %i2, %o0 switch (args->command) { 40011368: fa 06 20 04 ld [ %i0 + 4 ], %i5 4001136c: 05 20 01 1d sethi %hi(0x80047400), %g2 40011370: 82 10 a0 10 or %g2, 0x10, %g1 ! 80047410 40011374: 80 a7 40 01 cmp %i5, %g1 40011378: 02 80 00 df be 400116f4 4001137c: b6 10 00 18 mov %i0, %i3 40011380: 08 80 00 76 bleu 40011558 40011384: 03 10 01 1d sethi %hi(0x40047400), %g1 40011388: 03 20 02 1d sethi %hi(0x80087400), %g1 4001138c: 86 10 60 0c or %g1, 0xc, %g3 ! 8008740c 40011390: 80 a7 40 03 cmp %i5, %g3 40011394: 22 80 00 aa be,a 4001163c 40011398: c2 06 40 00 ld [ %i1 ], %g1 4001139c: 08 80 00 81 bleu 400115a0 400113a0: 84 10 a0 1b or %g2, 0x1b, %g2 400113a4: 33 1f f4 e2 sethi %hi(0x7fd38800), %i1 400113a8: 82 16 63 ec or %i1, 0x3ec, %g1 ! 7fd38bec 400113ac: 82 07 40 01 add %i5, %g1, %g1 400113b0: 80 a0 60 02 cmp %g1, 2 400113b4: 18 80 00 c3 bgu 400116c0 <== NEVER TAKEN 400113b8: 94 10 20 2c mov 0x2c, %o2 tty->termios = *(struct termios *)args->buffer; 400113bc: d2 06 20 08 ld [ %i0 + 8 ], %o1 400113c0: b0 07 20 50 add %i4, 0x50, %i0 400113c4: 40 00 04 ea call 4001276c 400113c8: 90 10 00 18 mov %i0, %o0 if (args->command == TIOCSETAW || args->command == TIOCSETAF) { 400113cc: b2 16 63 eb or %i1, 0x3eb, %i1 400113d0: ba 07 40 19 add %i5, %i1, %i5 400113d4: 80 a7 60 01 cmp %i5, 1 400113d8: 08 80 01 24 bleu 40011868 400113dc: 01 00 00 00 nop if (( tty->flow_ctrl & FL_MDXON) && 400113e0: c2 07 21 48 ld [ %i4 + 0x148 ], %g1 400113e4: 80 88 62 00 btst 0x200, %g1 400113e8: 02 80 00 23 be 40011474 400113ec: f6 07 21 7c ld [ %i4 + 0x17c ], %i3 !(tty->termios.c_iflag & IXON)) { 400113f0: c2 07 20 50 ld [ %i4 + 0x50 ], %g1 if (( tty->flow_ctrl & FL_MDXON) && 400113f4: 80 88 62 00 btst 0x200, %g1 400113f8: 12 80 00 1f bne 40011474 400113fc: 01 00 00 00 nop tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 40011400: c2 07 21 48 ld [ %i4 + 0x148 ], %g1 40011404: 82 08 7d ef and %g1, -529, %g1 40011408: c2 27 21 48 st %g1, [ %i4 + 0x148 ] if (tty->flow_ctrl & FL_OSTOP) { 4001140c: c2 07 21 48 ld [ %i4 + 0x148 ], %g1 40011410: 80 88 60 20 btst 0x20, %g1 40011414: 02 80 00 18 be 40011474 <== ALWAYS TAKEN 40011418: 01 00 00 00 nop ( *context->lock_acquire )( context, lock_context ); 4001141c: c2 06 e0 14 ld [ %i3 + 0x14 ], %g1 <== NOT EXECUTED 40011420: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 40011424: 9f c0 40 00 call %g1 <== NOT EXECUTED 40011428: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 4001142c: c2 07 21 48 ld [ %i4 + 0x148 ], %g1 <== NOT EXECUTED 40011430: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED 40011434: c2 27 21 48 st %g1, [ %i4 + 0x148 ] <== NOT EXECUTED if (tty->rawOutBufState != rob_idle) { 40011438: c2 07 20 e4 ld [ %i4 + 0xe4 ], %g1 <== NOT EXECUTED 4001143c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011440: 22 80 00 0a be,a 40011468 <== NOT EXECUTED 40011444: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED ctx, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 40011448: c4 07 20 c0 ld [ %i4 + 0xc0 ], %g2 <== NOT EXECUTED 4001144c: d2 07 20 b8 ld [ %i4 + 0xb8 ], %o1 <== NOT EXECUTED (*tty->handler.write)( 40011450: c2 07 21 30 ld [ %i4 + 0x130 ], %g1 <== NOT EXECUTED 40011454: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40011458: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED 4001145c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40011460: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED ( *context->lock_release )( context, lock_context ); 40011464: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED 40011468: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED 4001146c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40011470: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) { 40011474: c2 07 21 48 ld [ %i4 + 0x148 ], %g1 40011478: 80 88 64 00 btst 0x400, %g1 4001147c: 02 80 00 06 be 40011494 40011480: 01 00 00 00 nop 40011484: c2 07 20 50 ld [ %i4 + 0x50 ], %g1 40011488: 80 88 64 00 btst 0x400, %g1 4001148c: 02 80 01 10 be 400118cc <== ALWAYS TAKEN 40011490: 01 00 00 00 nop if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) { 40011494: c4 07 21 48 ld [ %i4 + 0x148 ], %g2 40011498: c2 07 20 58 ld [ %i4 + 0x58 ], %g1 4001149c: 3b 00 00 c0 sethi %hi(0x30000), %i5 400114a0: 80 88 a1 00 btst 0x100, %g2 400114a4: 02 80 00 de be 4001181c <== ALWAYS TAKEN 400114a8: 82 08 40 1d and %g1, %i5, %g1 400114ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400114b0: 02 80 00 c9 be 400117d4 <== NOT EXECUTED 400114b4: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl |= FL_MDRTS; 400114b8: c2 07 21 48 ld [ %i4 + 0x148 ], %g1 <== NOT EXECUTED 400114bc: 82 10 61 00 or %g1, 0x100, %g1 <== NOT EXECUTED 400114c0: c2 27 21 48 st %g1, [ %i4 + 0x148 ] <== NOT EXECUTED if (tty->termios.c_iflag & IXOFF) { 400114c4: c2 07 20 50 ld [ %i4 + 0x50 ], %g1 <== NOT EXECUTED 400114c8: 80 88 64 00 btst 0x400, %g1 400114cc: 02 80 00 06 be 400114e4 400114d0: 80 88 62 00 btst 0x200, %g1 tty->flow_ctrl |= FL_MDXOF; 400114d4: c4 07 21 48 ld [ %i4 + 0x148 ], %g2 400114d8: 84 10 a4 00 or %g2, 0x400, %g2 400114dc: c4 27 21 48 st %g2, [ %i4 + 0x148 ] if (tty->termios.c_iflag & IXON) { 400114e0: 80 88 62 00 btst 0x200, %g1 400114e4: 22 80 00 06 be,a 400114fc 400114e8: c2 07 20 5c ld [ %i4 + 0x5c ], %g1 tty->flow_ctrl |= FL_MDXON; 400114ec: c2 07 21 48 ld [ %i4 + 0x148 ], %g1 400114f0: 82 10 62 00 or %g1, 0x200, %g1 400114f4: c2 27 21 48 st %g1, [ %i4 + 0x148 ] if (tty->termios.c_lflag & ICANON) { 400114f8: c2 07 20 5c ld [ %i4 + 0x5c ], %g1 400114fc: 80 88 61 00 btst 0x100, %g1 40011500: 12 80 00 a6 bne 40011798 40011504: 82 10 20 01 mov 1, %g1 tty->vtimeTicks = tty->termios.c_cc[VTIME] * 40011508: c6 0f 20 71 ldub [ %i4 + 0x71 ], %g3 4001150c: 03 10 00 4d sethi %hi(0x40013400), %g1 40011510: c2 00 60 bc ld [ %g1 + 0xbc ], %g1 ! 400134bc <_Watchdog_Ticks_per_second> 40011514: 82 58 c0 01 smul %g3, %g1, %g1 rtems_clock_get_ticks_per_second() / 10; 40011518: 05 33 33 33 sethi %hi(0xcccccc00), %g2 4001151c: 84 10 a0 cd or %g2, 0xcd, %g2 ! cccccccd 40011520: 80 50 40 02 umul %g1, %g2, %g0 40011524: 83 40 00 00 rd %y, %g1 40011528: 83 30 60 03 srl %g1, 3, %g1 tty->vtimeTicks = tty->termios.c_cc[VTIME] * 4001152c: c2 27 20 7c st %g1, [ %i4 + 0x7c ] if (tty->termios.c_cc[VTIME]) { 40011530: 80 a0 e0 00 cmp %g3, 0 40011534: 02 80 00 e1 be 400118b8 40011538: c4 0f 20 70 ldub [ %i4 + 0x70 ], %g2 if (tty->termios.c_cc[VMIN]) 4001153c: 80 88 a0 ff btst 0xff, %g2 tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 40011540: c2 27 20 ac st %g1, [ %i4 + 0xac ] tty->rawInBufSemaphoreWait = true; 40011544: 84 10 20 01 mov 1, %g2 if (tty->termios.c_cc[VMIN]) 40011548: 12 80 00 96 bne 400117a0 4001154c: c4 2f 20 a8 stb %g2, [ %i4 + 0xa8 ] tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 40011550: 10 80 00 95 b 400117a4 40011554: c2 27 20 b0 st %g1, [ %i4 + 0xb0 ] switch (args->command) { 40011558: 82 10 60 1a or %g1, 0x1a, %g1 4001155c: 80 a7 40 01 cmp %i5, %g1 40011560: 22 80 00 86 be,a 40011778 40011564: c2 06 20 08 ld [ %i0 + 8 ], %g1 40011568: 08 80 00 1c bleu 400115d8 4001156c: 03 10 0b 1d sethi %hi(0x402c7400), %g1 40011570: 82 10 60 13 or %g1, 0x13, %g1 ! 402c7413 <__end+0x2abc23> 40011574: 80 a7 40 01 cmp %i5, %g1 40011578: 12 80 00 52 bne 400116c0 4001157c: 94 10 20 2c mov 0x2c, %o2 *(struct termios *)args->buffer = tty->termios; 40011580: d0 06 20 08 ld [ %i0 + 8 ], %o0 40011584: 92 07 20 50 add %i4, 0x50, %o1 40011588: 40 00 04 79 call 4001276c 4001158c: b0 10 20 00 clr %i0 _Mutex_Release( mutex ); 40011590: 7f ff cf f4 call 40005560 <_Mutex_Release> 40011594: 90 10 00 1a mov %i2, %o0 } 40011598: 81 c7 e0 08 ret 4001159c: 81 e8 00 00 restore switch (args->command) { 400115a0: 80 a7 40 02 cmp %i5, %g2 400115a4: 02 80 00 2e be 4001165c 400115a8: 82 10 60 0b or %g1, 0xb, %g1 400115ac: 80 a7 40 01 cmp %i5, %g1 400115b0: 12 80 00 44 bne 400116c0 <== NEVER TAKEN 400115b4: b0 10 20 00 clr %i0 tty->tty_snd = *wakeup; 400115b8: c2 06 40 00 ld [ %i1 ], %g1 400115bc: c2 27 21 64 st %g1, [ %i4 + 0x164 ] 400115c0: c2 06 60 04 ld [ %i1 + 4 ], %g1 400115c4: c2 27 21 68 st %g1, [ %i4 + 0x168 ] 400115c8: 7f ff cf e6 call 40005560 <_Mutex_Release> 400115cc: 90 10 00 1a mov %i2, %o0 } 400115d0: 81 c7 e0 08 ret 400115d4: 81 e8 00 00 restore switch (args->command) { 400115d8: 03 08 00 1d sethi %hi(0x20007400), %g1 400115dc: 82 10 60 5e or %g1, 0x5e, %g1 ! 2000745e 400115e0: 80 a7 40 01 cmp %i5, %g1 400115e4: 02 80 00 5e be 4001175c 400115e8: 03 10 01 19 sethi %hi(0x40046400), %g1 400115ec: 82 10 62 7f or %g1, 0x27f, %g1 ! 4004667f <__end+0x2ae8f> 400115f0: 80 a7 40 01 cmp %i5, %g1 400115f4: 32 80 00 34 bne,a 400116c4 <== ALWAYS TAKEN 400115f8: c2 07 21 5c ld [ %i4 + 0x15c ], %g1 int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 400115fc: c2 07 20 88 ld [ %i4 + 0x88 ], %g1 <== NOT EXECUTED 40011600: c4 07 20 84 ld [ %i4 + 0x84 ], %g2 <== NOT EXECUTED if ( rawnc < 0 ) 40011604: 84 a0 40 02 subcc %g1, %g2, %g2 <== NOT EXECUTED 40011608: 0c 80 00 89 bneg 4001182c <== NOT EXECUTED 4001160c: 01 00 00 00 nop <== NOT EXECUTED *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 40011610: c2 07 20 40 ld [ %i4 + 0x40 ], %g1 <== NOT EXECUTED 40011614: c8 07 20 44 ld [ %i4 + 0x44 ], %g4 <== NOT EXECUTED 40011618: c6 06 e0 08 ld [ %i3 + 8 ], %g3 <== NOT EXECUTED 4001161c: 82 20 40 04 sub %g1, %g4, %g1 <== NOT EXECUTED 40011620: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 40011624: c2 20 c0 00 st %g1, [ %g3 ] <== NOT EXECUTED sc = RTEMS_SUCCESSFUL; 40011628: b0 10 20 00 clr %i0 <== NOT EXECUTED 4001162c: 7f ff cf cd call 40005560 <_Mutex_Release> <== NOT EXECUTED 40011630: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED } 40011634: 81 c7 e0 08 ret <== NOT EXECUTED 40011638: 81 e8 00 00 restore <== NOT EXECUTED tty->tty_rcv = *wakeup; 4001163c: c2 27 21 6c st %g1, [ %i4 + 0x16c ] sc = RTEMS_SUCCESSFUL; 40011640: b0 10 20 00 clr %i0 tty->tty_rcv = *wakeup; 40011644: c2 06 60 04 ld [ %i1 + 4 ], %g1 40011648: c2 27 21 70 st %g1, [ %i4 + 0x170 ] 4001164c: 7f ff cf c5 call 40005560 <_Mutex_Release> 40011650: 90 10 00 1a mov %i2, %o0 } 40011654: 81 c7 e0 08 ret 40011658: 81 e8 00 00 restore if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 4001165c: c2 07 21 5c ld [ %i4 + 0x15c ], %g1 40011660: 83 28 60 05 sll %g1, 5, %g1 40011664: 3b 10 00 6c sethi %hi(0x4001b000), %i5 40011668: ba 17 63 b8 or %i5, 0x3b8, %i5 ! 4001b3b8 4001166c: 82 07 40 01 add %i5, %g1, %g1 40011670: c2 00 60 04 ld [ %g1 + 4 ], %g1 40011674: 80 a0 60 00 cmp %g1, 0 40011678: 02 80 00 05 be 4001168c 4001167c: b0 10 20 00 clr %i0 sc = rtems_termios_linesw[tty->t_line].l_close(tty); 40011680: 9f c0 40 00 call %g1 40011684: 90 10 00 1c mov %i4, %o0 40011688: b0 10 00 08 mov %o0, %i0 tty->t_line=*(int*)(args->buffer); 4001168c: c2 06 e0 08 ld [ %i3 + 8 ], %g1 40011690: c2 00 40 00 ld [ %g1 ], %g1 40011694: c2 27 21 5c st %g1, [ %i4 + 0x15c ] if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 40011698: 83 28 60 05 sll %g1, 5, %g1 tty->t_sc = NULL; /* ensure that no more valid data */ 4001169c: c0 27 21 60 clr [ %i4 + 0x160 ] if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 400116a0: c2 07 40 01 ld [ %i5 + %g1 ], %g1 400116a4: 80 a0 60 00 cmp %g1, 0 400116a8: 02 bf ff ba be 40011590 400116ac: 01 00 00 00 nop sc = rtems_termios_linesw[tty->t_line].l_open(tty); 400116b0: 9f c0 40 00 call %g1 400116b4: 90 10 00 1c mov %i4, %o0 400116b8: 10 bf ff b6 b 40011590 400116bc: b0 10 00 08 mov %o0, %i0 if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 400116c0: c2 07 21 5c ld [ %i4 + 0x15c ], %g1 400116c4: 85 28 60 05 sll %g1, 5, %g2 400116c8: 03 10 00 6c sethi %hi(0x4001b000), %g1 400116cc: 82 10 63 b8 or %g1, 0x3b8, %g1 ! 4001b3b8 400116d0: 82 00 40 02 add %g1, %g2, %g1 400116d4: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 400116d8: 80 a0 60 00 cmp %g1, 0 400116dc: 02 80 00 83 be 400118e8 400116e0: 92 10 00 1b mov %i3, %o1 sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 400116e4: 9f c0 40 00 call %g1 400116e8: 90 10 00 1c mov %i4, %o0 400116ec: 10 bf ff a9 b 40011590 400116f0: b0 10 00 08 mov %o0, %i0 flags = *((int *)args->buffer); 400116f4: c2 06 20 08 ld [ %i0 + 8 ], %g1 400116f8: c2 00 40 00 ld [ %g1 ], %g1 if (flags == 0) { 400116fc: 80 a0 60 00 cmp %g1, 0 40011700: 12 80 00 22 bne 40011788 <== ALWAYS TAKEN 40011704: 80 88 60 02 btst 2, %g1 40011708: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED rtems_termios_device_context *ctx = tty->device_context; 4001170c: f6 07 21 7c ld [ %i4 + 0x17c ], %i3 <== NOT EXECUTED ( *context->lock_acquire )( context, lock_context ); 40011710: c2 06 e0 14 ld [ %i3 + 0x14 ], %g1 40011714: 90 10 00 1b mov %i3, %o0 40011718: 9f c0 40 00 call %g1 4001171c: 92 07 bf fc add %fp, -4, %o1 tty->rawOutBuf.Tail = 0; 40011720: c0 27 20 c0 clr [ %i4 + 0xc0 ] ( *context->lock_release )( context, lock_context ); 40011724: 92 07 bf fc add %fp, -4, %o1 tty->rawOutBuf.Head = 0; 40011728: c0 27 20 bc clr [ %i4 + 0xbc ] tty->rawOutBufState = rob_idle; 4001172c: c0 27 20 e4 clr [ %i4 + 0xe4 ] 40011730: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 40011734: 9f c0 40 00 call %g1 40011738: 90 10 00 1b mov %i3, %o0 if (flags & FREAD) { 4001173c: 80 a7 60 00 cmp %i5, 0 40011740: 32 80 00 3e bne,a 40011838 40011744: fa 07 21 7c ld [ %i4 + 0x17c ], %i5 sc = RTEMS_SUCCESSFUL; 40011748: b0 10 20 00 clr %i0 4001174c: 7f ff cf 85 call 40005560 <_Mutex_Release> 40011750: 90 10 00 1a mov %i2, %o0 } 40011754: 81 c7 e0 08 ret 40011758: 81 e8 00 00 restore drainOutput (tty); 4001175c: 7f ff f7 a3 call 4000f5e8 40011760: 90 10 00 1c mov %i4, %o0 sc = RTEMS_SUCCESSFUL; 40011764: b0 10 20 00 clr %i0 40011768: 7f ff cf 7e call 40005560 <_Mutex_Release> 4001176c: 90 10 00 1a mov %i2, %o0 } 40011770: 81 c7 e0 08 ret 40011774: 81 e8 00 00 restore *(int*)(args->buffer)=tty->t_line; 40011778: c4 07 21 5c ld [ %i4 + 0x15c ], %g2 4001177c: c4 20 40 00 st %g2, [ %g1 ] sc = RTEMS_SUCCESSFUL; 40011780: 10 bf ff f3 b 4001174c 40011784: b0 10 20 00 clr %i0 if (flags & FWRITE) { 40011788: 02 bf ff ed be 4001173c 4001178c: ba 08 60 01 and %g1, 1, %i5 rtems_termios_device_context *ctx = tty->device_context; 40011790: 10 bf ff e0 b 40011710 40011794: f6 07 21 7c ld [ %i4 + 0x17c ], %i3 tty->rawInBufSemaphoreTimeout = 0; 40011798: c0 27 20 ac clr [ %i4 + 0xac ] tty->rawInBufSemaphoreWait = true; 4001179c: c2 2f 20 a8 stb %g1, [ %i4 + 0xa8 ] tty->rawInBufSemaphoreFirstTimeout = 0; 400117a0: c0 27 20 b0 clr [ %i4 + 0xb0 ] if (tty->handler.set_attributes) { 400117a4: c2 07 21 34 ld [ %i4 + 0x134 ], %g1 400117a8: 80 a0 60 00 cmp %g1, 0 400117ac: 02 bf ff e7 be 40011748 400117b0: 92 10 00 18 mov %i0, %o1 sc = (*tty->handler.set_attributes)(tty->device_context, &tty->termios) ? 400117b4: d0 07 21 7c ld [ %i4 + 0x17c ], %o0 400117b8: 9f c0 40 00 call %g1 400117bc: b0 10 20 1b mov 0x1b, %i0 RTEMS_SUCCESSFUL : RTEMS_IO_ERROR; 400117c0: 80 a2 20 00 cmp %o0, 0 400117c4: 02 bf ff 73 be 40011590 400117c8: 01 00 00 00 nop sc = RTEMS_SUCCESSFUL; 400117cc: 10 bf ff e0 b 4001174c 400117d0: b0 10 20 00 clr %i0 ! 0 tty->flow_ctrl &= ~(FL_MDRTS); 400117d4: c2 07 21 48 ld [ %i4 + 0x148 ], %g1 <== NOT EXECUTED 400117d8: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED 400117dc: c2 27 21 48 st %g1, [ %i4 + 0x148 ] <== NOT EXECUTED if ((tty->flow_ctrl & FL_IRTSOFF) && 400117e0: c2 07 21 48 ld [ %i4 + 0x148 ], %g1 <== NOT EXECUTED 400117e4: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 400117e8: 02 80 00 4a be 40011910 <== NOT EXECUTED 400117ec: 01 00 00 00 nop <== NOT EXECUTED (tty->flow.start_remote_tx != NULL)) { 400117f0: c2 07 21 44 ld [ %i4 + 0x144 ], %g1 <== NOT EXECUTED if ((tty->flow_ctrl & FL_IRTSOFF) && 400117f4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400117f8: 02 80 00 46 be 40011910 <== NOT EXECUTED 400117fc: 01 00 00 00 nop <== NOT EXECUTED tty->flow.start_remote_tx(ctx); 40011800: 9f c0 40 00 call %g1 <== NOT EXECUTED 40011804: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED tty->flow_ctrl &= ~(FL_IRTSOFF); 40011808: c2 07 21 48 ld [ %i4 + 0x148 ], %g1 <== NOT EXECUTED 4001180c: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 40011810: c2 27 21 48 st %g1, [ %i4 + 0x148 ] <== NOT EXECUTED if (tty->termios.c_cflag & CRTSCTS) { 40011814: c2 07 20 58 ld [ %i4 + 0x58 ], %g1 <== NOT EXECUTED 40011818: 82 08 40 1d and %g1, %i5, %g1 <== NOT EXECUTED 4001181c: 80 a0 60 00 cmp %g1, 0 40011820: 22 bf ff 2a be,a 400114c8 <== ALWAYS TAKEN 40011824: c2 07 20 50 ld [ %i4 + 0x50 ], %g1 40011828: 30 bf ff 24 b,a 400114b8 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 4001182c: c2 07 20 8c ld [ %i4 + 0x8c ], %g1 <== NOT EXECUTED 40011830: 10 bf ff 78 b 40011610 <== NOT EXECUTED 40011834: 84 00 80 01 add %g2, %g1, %g2 <== NOT EXECUTED ( *context->lock_acquire )( context, lock_context ); 40011838: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 4001183c: 90 10 00 1d mov %i5, %o0 40011840: 9f c0 40 00 call %g1 40011844: 92 07 bf fc add %fp, -4, %o1 tty->rawInBuf.Tail = 0; 40011848: c0 27 20 88 clr [ %i4 + 0x88 ] ( *context->lock_release )( context, lock_context ); 4001184c: 92 07 bf fc add %fp, -4, %o1 tty->rawInBuf.Head = 0; 40011850: c0 27 20 84 clr [ %i4 + 0x84 ] 40011854: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 40011858: 9f c0 40 00 call %g1 4001185c: 90 10 00 1d mov %i5, %o0 } 40011860: 10 bf ff 4c b 40011590 40011864: b0 10 20 00 clr %i0 drainOutput (tty); 40011868: 7f ff f7 60 call 4000f5e8 4001186c: 90 10 00 1c mov %i4, %o0 if (args->command == TIOCSETAF) { 40011870: c4 06 e0 04 ld [ %i3 + 4 ], %g2 40011874: 03 20 0b 1d sethi %hi(0x802c7400), %g1 40011878: 82 10 60 16 or %g1, 0x16, %g1 ! 802c7416 4001187c: 80 a0 80 01 cmp %g2, %g1 40011880: 12 bf fe d8 bne 400113e0 40011884: 01 00 00 00 nop rtems_termios_device_context *ctx = tty->device_context; 40011888: fa 07 21 7c ld [ %i4 + 0x17c ], %i5 ( *context->lock_acquire )( context, lock_context ); 4001188c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 40011890: 90 10 00 1d mov %i5, %o0 40011894: 9f c0 40 00 call %g1 40011898: 92 07 bf fc add %fp, -4, %o1 tty->rawInBuf.Tail = 0; 4001189c: c0 27 20 88 clr [ %i4 + 0x88 ] ( *context->lock_release )( context, lock_context ); 400118a0: 92 07 bf fc add %fp, -4, %o1 tty->rawInBuf.Head = 0; 400118a4: c0 27 20 84 clr [ %i4 + 0x84 ] 400118a8: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 400118ac: 9f c0 40 00 call %g1 400118b0: 90 10 00 1d mov %i5, %o0 } 400118b4: 30 bf fe cb b,a 400113e0 if (tty->termios.c_cc[VMIN]) { 400118b8: 80 88 a0 ff btst 0xff, %g2 400118bc: 12 bf ff b7 bne 40011798 400118c0: 82 10 20 01 mov 1, %g1 tty->rawInBufSemaphoreWait = false; 400118c4: 10 bf ff b8 b 400117a4 400118c8: c0 2f 20 a8 clrb [ %i4 + 0xa8 ] tty->flow_ctrl &= ~(FL_MDXOF); 400118cc: c2 07 21 48 ld [ %i4 + 0x148 ], %g1 400118d0: 82 08 7b ff and %g1, -1025, %g1 400118d4: c2 27 21 48 st %g1, [ %i4 + 0x148 ] tty->flow_ctrl &= ~(FL_ISNTXOF); 400118d8: c2 07 21 48 ld [ %i4 + 0x148 ], %g1 400118dc: 82 08 7f fd and %g1, -3, %g1 400118e0: c2 27 21 48 st %g1, [ %i4 + 0x148 ] 400118e4: 30 bf fe ec b,a 40011494 } else if (tty->handler.ioctl) { 400118e8: c2 07 21 38 ld [ %i4 + 0x138 ], %g1 400118ec: 80 a0 60 00 cmp %g1, 0 400118f0: 02 80 00 0d be 40011924 <== ALWAYS TAKEN 400118f4: 92 10 00 1d mov %i5, %o1 args->ioctl_return = (*tty->handler.ioctl) (tty->device_context, 400118f8: d4 06 e0 08 ld [ %i3 + 8 ], %o2 <== NOT EXECUTED 400118fc: d0 07 21 7c ld [ %i4 + 0x17c ], %o0 <== NOT EXECUTED 40011900: 9f c0 40 00 call %g1 <== NOT EXECUTED 40011904: b0 10 20 00 clr %i0 <== NOT EXECUTED sc = RTEMS_SUCCESSFUL; 40011908: 10 bf ff 22 b 40011590 <== NOT EXECUTED 4001190c: d0 26 e0 0c st %o0, [ %i3 + 0xc ] <== NOT EXECUTED tty->flow_ctrl &= ~(FL_IRTSOFF); 40011910: c2 07 21 48 ld [ %i4 + 0x148 ], %g1 <== NOT EXECUTED 40011914: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 40011918: c2 27 21 48 st %g1, [ %i4 + 0x148 ] <== NOT EXECUTED if (tty->termios.c_iflag & IXOFF) { 4001191c: 10 bf fe eb b 400114c8 <== NOT EXECUTED 40011920: c2 07 20 50 ld [ %i4 + 0x50 ], %g1 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; 40011924: 10 bf ff 1b b 40011590 40011928: b0 10 20 0a mov 0xa, %i0 =============================================================================== 40004bfc : { 40004bfc: 9d e3 bf a0 save %sp, -96, %sp _Mutex_Acquire( mutex ); 40004c00: 3b 10 00 75 sethi %hi(0x4001d400), %i5 40004c04: 40 00 11 2c call 400090b4 <_Mutex_Acquire> 40004c08: 90 17 61 10 or %i5, 0x110, %o0 ! 4001d510 for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 40004c0c: 39 10 00 7d sethi %hi(0x4001f400), %i4 40004c10: d6 07 21 a4 ld [ %i4 + 0x1a4 ], %o3 ! 4001f5a4 40004c14: 80 a2 e0 00 cmp %o3, 0 40004c18: 32 80 00 08 bne,a 40004c38 <== NEVER TAKEN 40004c1c: c2 02 e0 0c ld [ %o3 + 0xc ], %g1 <== NOT EXECUTED tty = rtems_termios_open_tty( 40004c20: 10 80 00 0e b 40004c58 40004c24: 9a 10 00 1b mov %i3, %o5 for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 40004c28: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED 40004c2c: 02 80 00 0b be 40004c58 <== NOT EXECUTED 40004c30: 9a 10 00 1b mov %i3, %o5 <== NOT EXECUTED if ((tty->major == major) && (tty->minor == minor)) 40004c34: c2 02 e0 0c ld [ %o3 + 0xc ], %g1 <== NOT EXECUTED 40004c38: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 40004c3c: 32 bf ff fb bne,a 40004c28 <== NOT EXECUTED 40004c40: d6 02 c0 00 ld [ %o3 ], %o3 <== NOT EXECUTED 40004c44: c2 02 e0 10 ld [ %o3 + 0x10 ], %g1 <== NOT EXECUTED 40004c48: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 40004c4c: 32 bf ff f7 bne,a 40004c28 <== NOT EXECUTED 40004c50: d6 02 c0 00 ld [ %o3 ], %o3 <== NOT EXECUTED tty = rtems_termios_open_tty( 40004c54: 9a 10 00 1b mov %i3, %o5 <== NOT EXECUTED 40004c58: 98 10 20 00 clr %o4 40004c5c: 94 10 00 1a mov %i2, %o2 40004c60: 92 10 00 19 mov %i1, %o1 40004c64: 7f ff f9 be call 4000335c 40004c68: 90 10 00 18 mov %i0, %o0 if (tty == NULL) { 40004c6c: 80 a2 20 00 cmp %o0, 0 40004c70: 22 80 00 18 be,a 40004cd0 40004c74: 90 17 61 10 or %i5, 0x110, %o0 if (tty->refcount == 1) { 40004c78: c2 02 20 08 ld [ %o0 + 8 ], %g1 40004c7c: 80 a0 60 01 cmp %g1, 1 40004c80: 02 80 00 07 be 40004c9c <== ALWAYS TAKEN 40004c84: c2 07 21 a4 ld [ %i4 + 0x1a4 ], %g1 _Mutex_Release( mutex ); 40004c88: 90 17 61 10 or %i5, 0x110, %o0 40004c8c: 40 00 11 25 call 40009120 <_Mutex_Release> 40004c90: b0 10 20 00 clr %i0 } 40004c94: 81 c7 e0 08 ret 40004c98: 81 e8 00 00 restore tty->forw = rtems_termios_ttyHead; 40004c9c: c2 22 00 00 st %g1, [ %o0 ] if (rtems_termios_ttyHead != NULL) 40004ca0: 80 a0 60 00 cmp %g1, 0 40004ca4: 02 80 00 03 be 40004cb0 <== ALWAYS TAKEN 40004ca8: c0 22 20 04 clr [ %o0 + 4 ] rtems_termios_ttyHead->back = tty; 40004cac: d0 20 60 04 st %o0, [ %g1 + 4 ] <== NOT EXECUTED if (rtems_termios_ttyTail == NULL) 40004cb0: 03 10 00 7d sethi %hi(0x4001f400), %g1 rtems_termios_ttyHead = tty; 40004cb4: d0 27 21 a4 st %o0, [ %i4 + 0x1a4 ] if (rtems_termios_ttyTail == NULL) 40004cb8: c4 00 61 a0 ld [ %g1 + 0x1a0 ], %g2 40004cbc: 80 a0 a0 00 cmp %g2, 0 40004cc0: 22 bf ff f2 be,a 40004c88 <== ALWAYS TAKEN 40004cc4: d0 20 61 a0 st %o0, [ %g1 + 0x1a0 ] 40004cc8: 10 bf ff f1 b 40004c8c <== NOT EXECUTED 40004ccc: 90 17 61 10 or %i5, 0x110, %o0 <== NOT EXECUTED 40004cd0: 40 00 11 14 call 40009120 <_Mutex_Release> 40004cd4: b0 10 20 1a mov 0x1a, %i0 return RTEMS_NO_MEMORY; 40004cd8: 81 c7 e0 08 ret 40004cdc: 81 e8 00 00 restore =============================================================================== 400055bc : if (handler == NULL) { 400055bc: 82 92 20 00 orcc %o0, 0, %g1 400055c0: 02 80 00 05 be 400055d4 <== NEVER TAKEN 400055c4: 05 10 00 5e sethi %hi(0x40017800), %g2 return RTEMS_SUCCESSFUL; 400055c8: 90 10 20 00 clr %o0 400055cc: 81 c3 e0 08 retl 400055d0: c2 20 a3 14 st %g1, [ %g2 + 0x314 ] } 400055d4: 81 c3 e0 08 retl <== NOT EXECUTED 400055d8: 90 10 20 09 mov 9, %o0 <== NOT EXECUTED =============================================================================== 40011e94 : { const rtems_assoc_t *current = &rtems_termios_baud_table[ 0 ]; const rtems_assoc_t *last = current; speed_t spd; while ( current->name != NULL && current->local_value < baud ) { 40011e94: 07 10 00 4f sethi %hi(0x40013c00), %g3 40011e98: c4 00 e2 b8 ld [ %g3 + 0x2b8 ], %g2 ! 40013eb8 40011e9c: 80 a0 a0 00 cmp %g2, 0 40011ea0: 86 10 e2 b8 or %g3, 0x2b8, %g3 40011ea4: 12 80 00 09 bne 40011ec8 <== ALWAYS TAKEN 40011ea8: 82 10 00 03 mov %g3, %g1 if ( current->name != NULL ) { uint32_t mid = (last->local_value + current->local_value) / UINT32_C( 2 ); spd = baud <= mid ? last->remote_value : current->remote_value; } else { spd = B460800; 40011eac: 10 80 00 16 b 40011f04 <== NOT EXECUTED 40011eb0: 03 00 01 c2 sethi %hi(0x70800), %g1 <== NOT EXECUTED ++current; 40011eb4: 88 00 60 0c add %g1, 0xc, %g4 ! 7080c <_ISR_Stack_size+0x6f80c> while ( current->name != NULL && current->local_value < baud ) { 40011eb8: 80 a0 a0 00 cmp %g2, 0 40011ebc: 02 80 00 11 be 40011f00 40011ec0: 86 10 00 01 mov %g1, %g3 40011ec4: 82 10 00 04 mov %g4, %g1 40011ec8: c4 00 60 04 ld [ %g1 + 4 ], %g2 40011ecc: 80 a0 80 09 cmp %g2, %o1 40011ed0: 2a bf ff f9 bcs,a 40011eb4 40011ed4: c4 00 60 0c ld [ %g1 + 0xc ], %g2 uint32_t mid = (last->local_value + current->local_value) / UINT32_C( 2 ); 40011ed8: c8 00 e0 04 ld [ %g3 + 4 ], %g4 40011edc: 84 00 80 04 add %g2, %g4, %g2 40011ee0: 85 30 a0 01 srl %g2, 1, %g2 spd = baud <= mid ? last->remote_value : current->remote_value; 40011ee4: 80 a2 40 02 cmp %o1, %g2 40011ee8: 38 80 00 0a bgu,a 40011f10 40011eec: c2 00 60 08 ld [ %g1 + 8 ], %g1 40011ef0: c2 00 e0 08 ld [ %g3 + 8 ], %g1 } term->c_ispeed = spd; 40011ef4: c2 22 20 24 st %g1, [ %o0 + 0x24 ] term->c_ospeed = spd; } 40011ef8: 81 c3 e0 08 retl 40011efc: c2 22 20 28 st %g1, [ %o0 + 0x28 ] spd = B460800; 40011f00: 03 00 01 c2 sethi %hi(0x70800), %g1 term->c_ispeed = spd; 40011f04: c2 22 20 24 st %g1, [ %o0 + 0x24 ] } 40011f08: 81 c3 e0 08 retl 40011f0c: c2 22 20 28 st %g1, [ %o0 + 0x28 ] term->c_ispeed = spd; 40011f10: c2 22 20 24 st %g1, [ %o0 + 0x24 ] } 40011f14: 81 c3 e0 08 retl 40011f18: c2 22 20 28 st %g1, [ %o0 + 0x28 ] =============================================================================== 40001b24 : int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 40001b24: 9d e3 bf a0 save %sp, -96, %sp int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 40001b28: 03 08 00 00 sethi %hi(0x20000000), %g1 40001b2c: 80 8e 00 01 btst %i0, %g1 40001b30: 02 80 00 0e be 40001b68 40001b34: ba 10 00 18 mov %i0, %i5 if (rtems_panic_in_progress++) 40001b38: 05 10 02 69 sethi %hi(0x4009a400), %g2 40001b3c: c2 00 a2 24 ld [ %g2 + 0x224 ], %g1 ! 4009a624 40001b40: 86 00 60 01 add %g1, 1, %g3 40001b44: 80 a0 60 00 cmp %g1, 0 40001b48: 02 80 00 08 be 40001b68 <== ALWAYS TAKEN 40001b4c: c6 20 a2 24 st %g3, [ %g2 + 0x224 ] const ISR_lock_Context *lock_context ) { uint32_t disable_level; disable_level = cpu_self->thread_dispatch_disable_level; 40001b50: c2 01 a0 18 ld [ %g6 + 0x18 ], %g1 <== NOT EXECUTED _Profiling_Thread_dispatch_disable_critical( cpu_self, disable_level, lock_context ); cpu_self->thread_dispatch_disable_level = disable_level + 1; 40001b54: 82 00 60 01 inc %g1 <== NOT EXECUTED 40001b58: c2 21 a0 18 st %g1, [ %g6 + 0x18 ] <== NOT EXECUTED _Thread_Dispatch_disable(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 40001b5c: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED 40001b60: 14 80 00 1d bg 40001bd4 <== NOT EXECUTED 40001b64: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 40001b68: 7f ff fd f4 call 40001338 <__getreent> 40001b6c: 39 1c 00 00 sethi %hi(0x70000000), %i4 40001b70: 40 01 2b 37 call 4004c84c 40001b74: d0 02 20 08 ld [ %o0 + 8 ], %o0 status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 40001b78: 03 10 00 00 sethi %hi(0x40000000), %g1 40001b7c: 80 8f 40 01 btst %i5, %g1 40001b80: 12 80 00 17 bne 40001bdc 40001b84: b8 2f 40 1c andn %i5, %i4, %i4 #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu16 "] ", rtems_object_get_local_node()); #endif chars_written += vfprintf(stderr, printf_format, arglist); 40001b88: 7f ff fd ec call 40001338 <__getreent> 40001b8c: 01 00 00 00 nop 40001b90: d0 02 20 0c ld [ %o0 + 0xc ], %o0 40001b94: 94 10 00 1a mov %i2, %o2 40001b98: 40 01 ae e3 call 4006d724 40001b9c: 92 10 00 19 mov %i1, %o1 if (status) 40001ba0: 80 a7 20 00 cmp %i4, 0 40001ba4: 12 80 00 37 bne 40001c80 40001ba8: b0 10 00 08 mov %o0, %i0 chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 40001bac: 7f ff fd e3 call 40001338 <__getreent> 40001bb0: 01 00 00 00 nop 40001bb4: 13 10 02 3c sethi %hi(0x4008f000), %o1 40001bb8: d0 02 20 0c ld [ %o0 + 0xc ], %o0 40001bbc: 40 01 2f 05 call 4004d7d0 40001bc0: 92 12 63 88 or %o1, 0x388, %o1 (void) fflush(stderr); 40001bc4: 7f ff fd dd call 40001338 <__getreent> 40001bc8: b0 06 00 08 add %i0, %o0, %i0 40001bcc: 40 01 2b 20 call 4004c84c 40001bd0: d0 02 20 0c ld [ %o0 + 0xc ], %o0 return chars_written; 40001bd4: 81 c7 e0 08 ret 40001bd8: 81 e8 00 00 restore local_errno = errno; 40001bdc: 40 01 29 ce call 4004c314 <__errno> 40001be0: 01 00 00 00 nop chars_written += vfprintf(stderr, printf_format, arglist); 40001be4: 7f ff fd d5 call 40001338 <__getreent> 40001be8: fa 02 00 00 ld [ %o0 ], %i5 40001bec: d0 02 20 0c ld [ %o0 + 0xc ], %o0 40001bf0: 94 10 00 1a mov %i2, %o2 40001bf4: 40 01 ae cc call 4006d724 40001bf8: 92 10 00 19 mov %i1, %o1 if (status) 40001bfc: 80 a7 20 00 cmp %i4, 0 40001c00: 12 80 00 21 bne 40001c84 40001c04: b0 10 00 08 mov %o0, %i0 if (local_errno) { 40001c08: 80 a7 60 00 cmp %i5, 0 40001c0c: 02 bf ff e8 be 40001bac 40001c10: 01 00 00 00 nop if ((local_errno > 0) && *strerror(local_errno)) 40001c14: 04 80 00 08 ble 40001c34 40001c18: 01 00 00 00 nop 40001c1c: 40 01 70 e8 call 4005dfbc 40001c20: 90 10 00 1d mov %i5, %o0 40001c24: c2 4a 00 00 ldsb [ %o0 ], %g1 40001c28: 80 a0 60 00 cmp %g1, 0 40001c2c: 12 80 00 23 bne 40001cb8 <== ALWAYS TAKEN 40001c30: 01 00 00 00 nop chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 40001c34: 7f ff fd c1 call 40001338 <__getreent> 40001c38: 01 00 00 00 nop 40001c3c: 94 10 00 1d mov %i5, %o2 40001c40: d0 02 20 0c ld [ %o0 + 0xc ], %o0 40001c44: 13 10 02 0e sethi %hi(0x40083800), %o1 40001c48: 40 01 2e e2 call 4004d7d0 40001c4c: 92 12 61 80 or %o1, 0x180, %o1 ! 40083980 chars_written += fprintf(stderr, "\n"); 40001c50: 7f ff fd ba call 40001338 <__getreent> 40001c54: b0 06 00 08 add %i0, %o0, %i0 40001c58: 13 10 02 3c sethi %hi(0x4008f000), %o1 40001c5c: d0 02 20 0c ld [ %o0 + 0xc ], %o0 40001c60: 40 01 2e dc call 4004d7d0 40001c64: 92 12 63 88 or %o1, 0x388, %o1 (void) fflush(stderr); 40001c68: 7f ff fd b4 call 40001338 <__getreent> 40001c6c: b0 06 00 08 add %i0, %o0, %i0 40001c70: 40 01 2a f7 call 4004c84c 40001c74: d0 02 20 0c ld [ %o0 + 0xc ], %o0 return chars_written; 40001c78: 81 c7 e0 08 ret 40001c7c: 81 e8 00 00 restore int local_errno = 0; 40001c80: ba 10 20 00 clr %i5 fprintf(stderr, " (status: %s)", rtems_status_text(status)); 40001c84: 7f ff fd ad call 40001338 <__getreent> 40001c88: 01 00 00 00 nop 40001c8c: 82 10 00 08 mov %o0, %g1 40001c90: 90 10 00 1c mov %i4, %o0 40001c94: 40 00 45 4b call 400131c0 40001c98: f8 00 60 0c ld [ %g1 + 0xc ], %i4 40001c9c: 13 10 02 0e sethi %hi(0x40083800), %o1 40001ca0: 94 10 00 08 mov %o0, %o2 40001ca4: 92 12 61 60 or %o1, 0x160, %o1 40001ca8: 40 01 2e ca call 4004d7d0 40001cac: 90 10 00 1c mov %i4, %o0 chars_written += 40001cb0: 10 bf ff d6 b 40001c08 40001cb4: b0 06 00 08 add %i0, %o0, %i0 chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 40001cb8: 7f ff fd a0 call 40001338 <__getreent> 40001cbc: 01 00 00 00 nop 40001cc0: 82 10 00 08 mov %o0, %g1 40001cc4: 90 10 00 1d mov %i5, %o0 40001cc8: 40 01 70 bd call 4005dfbc 40001ccc: fa 00 60 0c ld [ %g1 + 0xc ], %i5 40001cd0: 13 10 02 0e sethi %hi(0x40083800), %o1 40001cd4: 94 10 00 08 mov %o0, %o2 40001cd8: 92 12 61 70 or %o1, 0x170, %o1 40001cdc: 40 01 2e bd call 4004d7d0 40001ce0: 90 10 00 1d mov %i5, %o0 40001ce4: 10 bf ff b2 b 40001bac 40001ce8: b0 06 00 08 add %i0, %o0, %i0 =============================================================================== 40001fdc : int rtems_vprintf( const rtems_printer *printer, const char *format, va_list ap ) { 40001fdc: 9d e3 bf a0 save %sp, -96, %sp * * @return true The printer is valid else false is returned. */ static inline bool rtems_print_printer_valid(const rtems_printer *printer) { return printer != NULL && printer->printer != NULL; 40001fe0: 80 a6 20 00 cmp %i0, 0 40001fe4: 02 80 00 09 be 40002008 <== NEVER TAKEN 40001fe8: 90 10 20 00 clr %o0 40001fec: c2 06 20 04 ld [ %i0 + 4 ], %g1 40001ff0: 80 a0 60 00 cmp %g1, 0 40001ff4: 02 80 00 05 be 40002008 <== NEVER TAKEN 40001ff8: 94 10 00 1a mov %i2, %o2 int len = 0; if ( rtems_print_printer_valid( printer ) ) { len = printer->printer( printer->context, format, ap ); 40001ffc: d0 06 00 00 ld [ %i0 ], %o0 40002000: 9f c0 40 00 call %g1 40002004: 92 10 00 19 mov %i1, %o1 } return len; } 40002008: 81 c7 e0 08 ret 4000200c: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 40002d10 : void setgrent(void) { 40002d10: 9d e3 bf a0 save %sp, -96, %sp pthread_once(&grp_once, grp_init); 40002d14: 13 10 00 0b sethi %hi(0x40002c00), %o1 40002d18: 11 10 02 69 sethi %hi(0x4009a400), %o0 40002d1c: 92 12 60 88 or %o1, 0x88, %o1 40002d20: 40 00 3d 1c call 40012190 40002d24: 90 12 22 2c or %o0, 0x22c, %o0 return pthread_getspecific(grp_key); 40002d28: 39 10 02 69 sethi %hi(0x4009a400), %i4 40002d2c: 40 00 3b f6 call 40011d04 40002d30: d0 07 22 28 ld [ %i4 + 0x228 ], %o0 ! 4009a628 grp_context *ctx = grp_get_context(); if (ctx == NULL) { 40002d34: ba 92 20 00 orcc %o0, 0, %i5 40002d38: 02 80 00 12 be 40002d80 40002d3c: 92 10 21 14 mov 0x114, %o1 return; } } _libcsupport_pwdgrp_init(); 40002d40: 40 00 06 10 call 40004580 <_libcsupport_pwdgrp_init> 40002d44: 01 00 00 00 nop if (ctx->fp != NULL) 40002d48: d0 07 40 00 ld [ %i5 ], %o0 40002d4c: 80 a2 20 00 cmp %o0, 0 40002d50: 02 80 00 05 be 40002d64 40002d54: 13 10 02 39 sethi %hi(0x4008e400), %o1 fclose(ctx->fp); 40002d58: 40 01 25 ea call 4004c500 40002d5c: 01 00 00 00 nop ctx->fp = fopen("/etc/group", "r"); 40002d60: 13 10 02 39 sethi %hi(0x4008e400), %o1 40002d64: 11 10 02 0e sethi %hi(0x40083800), %o0 40002d68: 92 12 62 80 or %o1, 0x280, %o1 40002d6c: 40 01 2a 93 call 4004d7b8 40002d70: 90 12 21 c8 or %o0, 0x1c8, %o0 40002d74: d0 27 40 00 st %o0, [ %i5 ] } 40002d78: 81 c7 e0 08 ret 40002d7c: 81 e8 00 00 restore ctx = calloc(1, sizeof(*ctx)); 40002d80: 7f ff fa 68 call 40001720 40002d84: 90 10 20 01 mov 1, %o0 if (ctx == NULL) 40002d88: ba 92 20 00 orcc %o0, 0, %i5 40002d8c: 02 bf ff fb be 40002d78 <== NEVER TAKEN 40002d90: b0 10 00 08 mov %o0, %i0 eno = pthread_setspecific(grp_key, ctx); 40002d94: d0 07 22 28 ld [ %i4 + 0x228 ], %o0 40002d98: 40 00 3b f2 call 40011d60 40002d9c: 92 10 00 18 mov %i0, %o1 if (eno != 0) { 40002da0: 80 a2 20 00 cmp %o0, 0 40002da4: 02 bf ff e7 be 40002d40 <== ALWAYS TAKEN 40002da8: 01 00 00 00 nop free(ctx); 40002dac: 7f ff fe 87 call 400027c8 <== NOT EXECUTED 40002db0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 400040b0 : * in some form is supported on most UNIX and POSIX systems. This * routine is necessary to mount instantiations of a file system * into the file system name space. */ int unmount( const char *path ) { 400040b0: 9d e3 bf 60 save %sp, -160, %sp int rv = 0; rtems_filesystem_eval_path_context_t ctx; int eval_flags = RTEMS_FS_FOLLOW_LINK; const rtems_filesystem_location_info_t *currentloc = rtems_filesystem_eval_path_start( &ctx, path, eval_flags ); 400040b4: 94 10 20 18 mov 0x18, %o2 400040b8: 92 10 00 18 mov %i0, %o1 400040bc: 7f ff fd b6 call 40003794 400040c0: 90 07 bf c8 add %fp, -56, %o0 rtems_filesystem_mount_table_entry_t *mt_entry = currentloc->mt_entry; 400040c4: fa 02 20 14 ld [ %o0 + 0x14 ], %i5 400040c8: c2 07 60 0c ld [ %i5 + 0xc ], %g1 400040cc: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 400040d0: 9f c0 40 00 call %g1 400040d4: d2 07 60 24 ld [ %i5 + 0x24 ], %o1 if ( rtems_filesystem_location_is_instance_root( currentloc ) ) { 400040d8: 80 a2 20 00 cmp %o0, 0 400040dc: 02 80 00 39 be 400041c0 400040e0: 01 00 00 00 nop &rtems_filesystem_root->location; 400040e4: 40 00 00 61 call 40004268 400040e8: 01 00 00 00 nop &rtems_filesystem_current->location; 400040ec: 40 00 00 5f call 40004268 400040f0: f8 02 20 04 ld [ %o0 + 4 ], %i4 return mt_entry == root->mt_entry || mt_entry == current->mt_entry; 400040f4: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 400040f8: 80 a7 40 01 cmp %i5, %g1 400040fc: 02 80 00 27 be 40004198 40004100: 01 00 00 00 nop 40004104: c2 02 00 00 ld [ %o0 ], %g1 40004108: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4000410c: 80 a7 40 01 cmp %i5, %g1 40004110: 02 80 00 22 be 40004198 40004114: 01 00 00 00 nop if ( !contains_root_or_current_directory( mt_entry ) ) { const rtems_filesystem_operations_table *mt_point_ops = mt_entry->mt_point_node->location.mt_entry->ops; 40004118: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 const rtems_filesystem_operations_table *mt_point_ops = 4000411c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 rv = (*mt_point_ops->unmount_h)( mt_entry ); 40004120: c2 00 60 0c ld [ %g1 + 0xc ], %g1 40004124: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 40004128: 9f c0 40 00 call %g1 4000412c: 90 10 00 1d mov %i5, %o0 if ( rv == 0 ) { 40004130: b0 92 20 00 orcc %o0, 0, %i0 40004134: 02 80 00 06 be 4000414c 40004138: 01 00 00 00 nop } else { errno = EACCES; rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 4000413c: 7f ff fd ec call 400038ec 40004140: 90 07 bf c8 add %fp, -56, %o0 if ( rv == 0 ) { 40004144: 81 c7 e0 08 ret 40004148: 81 e8 00 00 restore rtems_id self_task_id = rtems_task_self(); 4000414c: 40 00 0e 16 call 400079a4 40004150: 01 00 00 00 nop __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40004154: 91 d0 20 09 ta 9 mt_entry->unmount_task = self_task_id; 40004158: d0 27 60 3c st %o0, [ %i5 + 0x3c ] mt_entry->mounted = false; 4000415c: c0 2f 60 28 clrb [ %i5 + 0x28 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40004160: 91 d0 20 0a ta 0xa 40004164: 01 00 00 00 nop rtems_filesystem_eval_path_cleanup( &ctx ); 40004168: 7f ff fd e1 call 400038ec 4000416c: 90 07 bf c8 add %fp, -56, %o0 return rtems_event_system_receive( 40004170: 96 07 bf c4 add %fp, -60, %o3 40004174: 94 10 20 00 clr %o2 40004178: 92 10 20 00 clr %o1 4000417c: 40 00 0d c0 call 4000787c 40004180: 11 20 00 00 sethi %hi(0x80000000), %o0 rtems_status_code sc = rtems_event_transient_receive( RTEMS_WAIT, RTEMS_NO_TIMEOUT ); if ( sc != RTEMS_SUCCESSFUL ) { 40004184: 80 a2 20 00 cmp %o0, 0 40004188: 12 80 00 0c bne 400041b8 <== NEVER TAKEN 4000418c: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0 rtems_fatal_error_occurred( 0xdeadbeef ); } } return rv; } 40004190: 81 c7 e0 08 ret 40004194: 81 e8 00 00 restore errno = EBUSY; 40004198: 40 00 5e 45 call 4001baac <__errno> 4000419c: b0 10 3f ff mov -1, %i0 400041a0: 82 10 20 10 mov 0x10, %g1 400041a4: c2 22 00 00 st %g1, [ %o0 ] rtems_filesystem_eval_path_cleanup( &ctx ); 400041a8: 7f ff fd d1 call 400038ec 400041ac: 90 07 bf c8 add %fp, -56, %o0 } 400041b0: 81 c7 e0 08 ret 400041b4: 81 e8 00 00 restore rtems_fatal_error_occurred( 0xdeadbeef ); 400041b8: 40 00 0e 41 call 40007abc <== NOT EXECUTED 400041bc: 90 12 22 ef or %o0, 0x2ef, %o0 <== NOT EXECUTED errno = EACCES; 400041c0: 40 00 5e 3b call 4001baac <__errno> 400041c4: b0 10 3f ff mov -1, %i0 400041c8: 82 10 20 0d mov 0xd, %g1 400041cc: c2 22 00 00 st %g1, [ %o0 ] rtems_filesystem_eval_path_cleanup( &ctx ); 400041d0: 7f ff fd c7 call 400038ec 400041d4: 90 07 bf c8 add %fp, -56, %o0 if ( rv == 0 ) { 400041d8: 81 c7 e0 08 ret 400041dc: 81 e8 00 00 restore =============================================================================== 400173ec : ssize_t write( int fd, const void *buffer, size_t count ) { 400173ec: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; ssize_t n; rtems_libio_check_buffer( buffer ); 400173f0: 80 a6 60 00 cmp %i1, 0 400173f4: 02 80 00 31 be 400174b8 <== NEVER TAKEN 400173f8: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 400173fc: 02 80 00 20 be 4001747c 40017400: 90 10 20 00 clr %o0 LIBIO_GET_IOP_WITH_ACCESS( fd, iop, LIBIO_FLAGS_WRITE, EBADF ); 40017404: 03 10 00 5d sethi %hi(0x40017400), %g1 40017408: c2 00 63 d0 ld [ %g1 + 0x3d0 ], %g1 ! 400177d0 4001740c: 80 a6 00 01 cmp %i0, %g1 40017410: 1a 80 00 23 bcc 4001749c 40017414: bb 2e 20 01 sll %i0, 1, %i5 40017418: 39 10 00 6c sethi %hi(0x4001b000), %i4 4001741c: ba 07 40 18 add %i5, %i0, %i5 40017420: b8 17 21 20 or %i4, 0x120, %i4 40017424: bb 2f 60 04 sll %i5, 4, %i5 40017428: 90 07 40 1c add %i5, %i4, %o0 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 4001742c: 91 d0 20 09 ta 9 val = *obj; 40017430: c4 07 40 1c ld [ %i5 + %i4 ], %g2 *obj = val + arg; 40017434: 86 20 b0 00 sub %g2, -4096, %g3 40017438: c6 27 40 1c st %g3, [ %i5 + %i4 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 4001743c: 91 d0 20 0a ta 0xa 40017440: 01 00 00 00 nop 40017444: 84 08 a1 04 and %g2, 0x104, %g2 40017448: 80 a0 a1 04 cmp %g2, 0x104 4001744c: 12 80 00 0e bne 40017484 40017450: 94 10 00 1a mov %i2, %o2 /* * Now process the write() request. */ n = (*iop->pathinfo.handlers->write_h)( iop, buffer, count ); 40017454: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 40017458: c2 00 60 0c ld [ %g1 + 0xc ], %g1 4001745c: 9f c0 40 00 call %g1 40017460: 92 10 00 19 mov %i1, %o1 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40017464: 91 d0 20 09 ta 9 *obj = val - arg; 40017468: c4 07 00 1d ld [ %i4 + %i5 ], %g2 4001746c: 84 00 b0 00 add %g2, -4096, %g2 40017470: c4 27 00 1d st %g2, [ %i4 + %i5 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40017474: 91 d0 20 0a ta 0xa 40017478: 01 00 00 00 nop rtems_libio_iop_drop( iop ); return n; } 4001747c: 81 c7 e0 08 ret 40017480: 91 e8 00 08 restore %g0, %o0, %o0 __asm__ volatile ( "ta %1\n\t" : "=r" (psr) : "i" (SPARC_SWTRAP_IRQDIS)); 40017484: 91 d0 20 09 ta 9 40017488: c4 07 00 1d ld [ %i4 + %i5 ], %g2 4001748c: 84 00 b0 00 add %g2, -4096, %g2 40017490: c4 27 00 1d st %g2, [ %i4 + %i5 ] __asm__ volatile ( "ta %0\nnop\n" :: "i" (SPARC_SWTRAP_IRQEN), "r" (_psr)); 40017494: 91 d0 20 0a ta 0xa 40017498: 01 00 00 00 nop LIBIO_GET_IOP_WITH_ACCESS( fd, iop, LIBIO_FLAGS_WRITE, EBADF ); 4001749c: 7f ff e1 d8 call 4000fbfc <__errno> 400174a0: 01 00 00 00 nop 400174a4: 84 10 20 09 mov 9, %g2 ! 9 <_TLS_Alignment+0x8> 400174a8: 82 10 00 08 mov %o0, %g1 400174ac: 90 10 3f ff mov -1, %o0 400174b0: 10 bf ff f3 b 4001747c 400174b4: c4 20 40 00 st %g2, [ %g1 ] rtems_libio_check_buffer( buffer ); 400174b8: 7f ff e1 d1 call 4000fbfc <__errno> <== NOT EXECUTED 400174bc: 01 00 00 00 nop <== NOT EXECUTED 400174c0: 84 10 20 16 mov 0x16, %g2 ! 16 <_TLS_Alignment+0x15> <== NOT EXECUTED 400174c4: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED 400174c8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 400174cc: 10 bf ff ec b 4001747c <== NOT EXECUTED 400174d0: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED