RTEMS-5
Annotated Report
libbspcmdline
Sat Apr 11 20:16:25 2020
40003c60 <rtems_bsp_cmdline_get_param>:
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
40003c60: 9d e3 bf a0 save %sp, -96, %sp
const char *p;
if ( !name )
return NULL;
if ( !value )
40003c64: 80 a0 00 19 cmp %g0, %i1
40003c68: 84 60 3f ff subx %g0, -1, %g2
return NULL;
if ( !length )
40003c6c: 80 a0 00 1a cmp %g0, %i2
40003c70: 82 60 3f ff subx %g0, -1, %g1
40003c74: 80 90 80 01 orcc %g2, %g1, %g0
40003c78: 12 80 00 30 bne 40003d38 <rtems_bsp_cmdline_get_param+0xd8>
40003c7c: 80 a6 20 00 cmp %i0, 0
40003c80: 02 80 00 2e be 40003d38 <rtems_bsp_cmdline_get_param+0xd8>
40003c84: 01 00 00 00 nop
return NULL;
value[0] = '\0';
40003c88: c0 2e 40 00 clrb [ %i1 ]
p = rtems_bsp_cmdline_get_param_raw( name );
40003c8c: 40 00 00 2d call 40003d40 <rtems_bsp_cmdline_get_param_raw>
40003c90: 90 10 00 18 mov %i0, %o0
if ( !p )
40003c94: 80 a2 20 00 cmp %o0, 0
40003c98: 02 80 00 28 be 40003d38 <rtems_bsp_cmdline_get_param+0xd8>
40003c9c: 01 00 00 00 nop
for (i=0 ; *p && i<length-1; ) {
40003ca0: c6 0a 00 00 ldub [ %o0 ], %g3
40003ca4: 85 28 e0 18 sll %g3, 0x18, %g2
40003ca8: 80 a0 a0 00 cmp %g2, 0
40003cac: 02 80 00 21 be 40003d30 <rtems_bsp_cmdline_get_param+0xd0>
<== NEVER TAKEN
40003cb0: b4 86 bf ff addcc %i2, -1, %i2
40003cb4: 02 80 00 1f be 40003d30 <rtems_bsp_cmdline_get_param+0xd0>
<== NEVER TAKEN
40003cb8: 82 10 20 00 clr %g1
quotes=0;
40003cbc: 10 80 00 11 b 40003d00 <rtems_bsp_cmdline_get_param+0xa0>
40003cc0: 88 10 20 00 clr %g4
} else if ( ((quotes % 2) == 0) && *p == ' ' )
40003cc4: 12 80 00 04 bne 40003cd4 <rtems_bsp_cmdline_get_param+0x74>
40003cc8: 80 a0 a0 20 cmp %g2, 0x20
40003ccc: 02 80 00 19 be 40003d30 <rtems_bsp_cmdline_get_param+0xd0>
40003cd0: 01 00 00 00 nop
value[i++] = *p++;
40003cd4: c6 2e 40 01 stb %g3, [ %i1 + %g1 ]
40003cd8: 82 00 60 01 inc %g1
value[i] = '\0';
40003cdc: c0 2e 40 01 clrb [ %i1 + %g1 ]
for (i=0 ; *p && i<length-1; ) {
40003ce0: c6 0a 00 01 ldub [ %o0 + %g1 ], %g3
40003ce4: 85 28 e0 18 sll %g3, 0x18, %g2
40003ce8: 80 a0 a0 00 cmp %g2, 0
40003cec: 02 80 00 11 be 40003d30 <rtems_bsp_cmdline_get_param+0xd0>
40003cf0: 01 00 00 00 nop
40003cf4: 80 a6 80 01 cmp %i2, %g1
40003cf8: 02 80 00 0e be 40003d30 <rtems_bsp_cmdline_get_param+0xd0>
40003cfc: 01 00 00 00 nop
if ( *p == '\"' ) {
40003d00: 85 38 a0 18 sra %g2, 0x18, %g2
40003d04: 80 a0 a0 22 cmp %g2, 0x22
40003d08: 12 bf ff ef bne 40003cc4 <rtems_bsp_cmdline_get_param+0x64>
40003d0c: 80 89 20 01 btst 1, %g4
value[i++] = *p++;
40003d10: c6 2e 40 01 stb %g3, [ %i1 + %g1 ]
40003d14: 82 00 60 01 inc %g1
value[i] = '\0';
40003d18: c0 2e 40 01 clrb [ %i1 + %g1 ]
for (i=0 ; *p && i<length-1; ) {
40003d1c: c6 0a 00 01 ldub [ %o0 + %g1 ], %g3
40003d20: 85 28 e0 18 sll %g3, 0x18, %g2
40003d24: 80 a0 a0 00 cmp %g2, 0
40003d28: 12 bf ff f3 bne 40003cf4 <rtems_bsp_cmdline_get_param+0x94>
<== ALWAYS TAKEN
40003d2c: 88 01 20 01 inc %g4
return NULL;
40003d30: 81 c7 e0 08 ret
40003d34: 91 e8 00 19 restore %g0, %i1, %o0
return NULL;
copy_string( p, value, length );
return value;
}
40003d38: 81 c7 e0 08 ret
40003d3c: 91 e8 20 00 restore %g0, 0, %o0
40003d70 <rtems_bsp_cmdline_get_param_rhs>:
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
40003d70: 9d e3 bf a0 save %sp, -96, %sp
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
40003d74: 90 10 00 18 mov %i0, %o0
{
40003d78: ba 10 00 18 mov %i0, %i5
p = rtems_bsp_cmdline_get_param( name, value, length );
40003d7c: 94 10 00 1a mov %i2, %o2
40003d80: 7f ff ff b8 call 40003c60 <rtems_bsp_cmdline_get_param>
40003d84: 92 10 00 19 mov %i1, %o1
if ( !p )
40003d88: b0 92 20 00 orcc %o0, 0, %i0
40003d8c: 02 80 00 23 be 40003e18 <rtems_bsp_cmdline_get_param_rhs+0xa8>
40003d90: 01 00 00 00 nop
return NULL;
rhs = &p[strlen(name)];
40003d94: 40 00 29 3a call 4000e27c <strlen>
40003d98: 90 10 00 1d mov %i5, %o0
if ( *rhs != '=' )
40003d9c: c2 4e 00 08 ldsb [ %i0 + %o0 ], %g1
40003da0: 80 a0 60 3d cmp %g1, 0x3d
40003da4: 12 80 00 1c bne 40003e14 <rtems_bsp_cmdline_get_param_rhs+0xa4>
40003da8: b0 06 00 08 add %i0, %o0, %i0
return NULL;
rhs++;
if ( *rhs == '\"' )
40003dac: c4 0e 20 01 ldub [ %i0 + 1 ], %g2
40003db0: 83 28 a0 18 sll %g2, 0x18, %g1
40003db4: 87 38 60 18 sra %g1, 0x18, %g3
40003db8: 80 a0 e0 22 cmp %g3, 0x22
40003dbc: 02 80 00 19 be 40003e20 <rtems_bsp_cmdline_get_param_rhs+0xb0>
40003dc0: 80 a0 60 00 cmp %g1, 0
rhs++;
for ( d=value ; *rhs ; )
40003dc4: 02 80 00 1c be 40003e34 <rtems_bsp_cmdline_get_param_rhs+0xc4>
40003dc8: b0 06 20 01 inc %i0
40003dcc: 10 80 00 03 b 40003dd8 <rtems_bsp_cmdline_get_param_rhs+0x68>
40003dd0: 82 10 00 19 mov %i1, %g1
40003dd4: 84 10 00 04 mov %g4, %g2
*d++ = *rhs++;
40003dd8: c4 28 40 00 stb %g2, [ %g1 ]
40003ddc: b0 06 20 01 inc %i0
for ( d=value ; *rhs ; )
40003de0: c6 4e 00 00 ldsb [ %i0 ], %g3
*d++ = *rhs++;
40003de4: 82 00 60 01 inc %g1
for ( d=value ; *rhs ; )
40003de8: 80 a0 e0 00 cmp %g3, 0
40003dec: 12 bf ff fa bne 40003dd4 <rtems_bsp_cmdline_get_param_rhs+0x64>
40003df0: c8 0e 00 00 ldub [ %i0 ], %g4
if ( *(d-1) == '\"' )
40003df4: 85 28 a0 18 sll %g2, 0x18, %g2
40003df8: 85 38 a0 18 sra %g2, 0x18, %g2
d--;
40003dfc: 84 18 a0 22 xor %g2, 0x22, %g2
40003e00: 80 a0 00 02 cmp %g0, %g2
40003e04: 82 40 7f ff addx %g1, -1, %g1
*d = '\0';
40003e08: c0 28 40 00 clrb [ %g1 ]
return value;
40003e0c: 81 c7 e0 08 ret
40003e10: 91 e8 00 19 restore %g0, %i1, %o0
return NULL;
40003e14: b0 10 20 00 clr %i0
}
40003e18: 81 c7 e0 08 ret
40003e1c: 81 e8 00 00 restore
40003e20: c4 0e 20 02 ldub [ %i0 + 2 ], %g2
40003e24: 83 28 a0 18 sll %g2, 0x18, %g1
for ( d=value ; *rhs ; )
40003e28: 80 a0 60 00 cmp %g1, 0
40003e2c: 12 bf ff e8 bne 40003dcc <rtems_bsp_cmdline_get_param_rhs+0x5c>
<== ALWAYS TAKEN
40003e30: b0 06 20 02 add %i0, 2, %i0
40003e34: c4 0e 7f ff ldub [ %i1 + -1 ], %g2
40003e38: 82 10 00 19 mov %i1, %g1
if ( *(d-1) == '\"' )
40003e3c: 85 28 a0 18 sll %g2, 0x18, %g2
40003e40: 85 38 a0 18 sra %g2, 0x18, %g2
d--;
40003e44: 84 18 a0 22 xor %g2, 0x22, %g2
40003e48: 80 a0 00 02 cmp %g0, %g2
40003e4c: 82 40 7f ff addx %g1, -1, %g1
*d = '\0';
40003e50: c0 28 40 00 clrb [ %g1 ]
return value;
40003e54: 81 c7 e0 08 ret
40003e58: 91 e8 00 19 restore %g0, %i1, %o0