RTEMS-6
Annotated Report
libbspcmdline
Sun Feb 28 23:15:32 2021

00103fa0 <rtems_bsp_cmdline_get_param>:                                                   
const char *rtems_bsp_cmdline_get_param(                                                  
  const char *name,                                                                       
  char       *value,                                                                      
  size_t      length                                                                      
)                                                                                         
{                                                                                         
  103fa0:   55                      push   %ebp                                           
  103fa1:   89 e5                   mov    %esp,%ebp                                      
  103fa3:   57                      push   %edi                                           
  103fa4:   56                      push   %esi                                           
  103fa5:   53                      push   %ebx                                           
  103fa6:   83 ec 1c                sub    $0x1c,%esp                                     
  103fa9:   8b 75 0c                mov    0xc(%ebp),%esi                                 
  103fac:   8b 5d 10                mov    0x10(%ebp),%ebx                                
  103faf:   8b 4d 08                mov    0x8(%ebp),%ecx                                 
  const char *p;                                                                          
                                                                                          
  if ( !name )                                                                            
    return NULL;                                                                          
                                                                                          
  if ( !value )                                                                           
  103fb2:   85 f6                   test   %esi,%esi                                      
  103fb4:   0f 94 c2                sete   %dl                                            
    return NULL;                                                                          
                                                                                          
  if ( !length )                                                                          
  103fb7:   85 db                   test   %ebx,%ebx                                      
  103fb9:   0f 94 c0                sete   %al                                            
  103fbc:   08 c2                   or     %al,%dl                                        
  103fbe:   75 70                   jne    104030 <rtems_bsp_cmdline_get_param+0x90>      <== NEVER TAKEN
  103fc0:   85 c9                   test   %ecx,%ecx                                      
  103fc2:   74 6c                   je     104030 <rtems_bsp_cmdline_get_param+0x90>      <== NEVER TAKEN
    return NULL;                                                                          
                                                                                          
  value[0] = '\0';                                                                        
  103fc4:   c6 06 00                movb   $0x0,(%esi)                                    <== NOT EXECUTED
                                                                                          
  p = rtems_bsp_cmdline_get_param_raw( name );                                            
  103fc7:   89 0c 24                mov    %ecx,(%esp)                                    <== NOT EXECUTED
  103fca:   e8 71 00 00 00          call   104040 <rtems_bsp_cmdline_get_param_raw>       <== NOT EXECUTED
                                                                                          
  if ( !p )                                                                               
  103fcf:   85 c0                   test   %eax,%eax                                      
  103fd1:   74 5d                   je     104030 <rtems_bsp_cmdline_get_param+0x90>      <== NEVER TAKEN
  for (i=0 ; *p && i<length-1; ) {                                                        
  103fd3:   0f b6 10                movzbl (%eax),%edx                                    
  103fd6:   84 d2                   test   %dl,%dl                                        
  103fd8:   74 4a                   je     104024 <rtems_bsp_cmdline_get_param+0x84>      <== NEVER TAKEN
  103fda:   4b                      dec    %ebx                                           
  103fdb:   74 47                   je     104024 <rtems_bsp_cmdline_get_param+0x84>      <== NEVER TAKEN
  103fdd:   8d 4e 01                lea    0x1(%esi),%ecx                                 
  103fe0:   01 c3                   add    %eax,%ebx                                      
  quotes=0;                                                                               
  103fe2:   31 ff                   xor    %edi,%edi                                      
  103fe4:   eb 2a                   jmp    104010 <rtems_bsp_cmdline_get_param+0x70>      
  103fe6:   8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi                          
  103fed:   8d 76 00                lea    0x0(%esi),%esi                                 
    } else if ( ((quotes % 2) == 0) && *p == ' ' )                                        
  103ff0:   f7 c7 01 00 00 00       test   $0x1,%edi                                      
  103ff6:   75 05                   jne    103ffd <rtems_bsp_cmdline_get_param+0x5d>      
  103ff8:   80 fa 20                cmp    $0x20,%dl                                      
  103ffb:   74 27                   je     104024 <rtems_bsp_cmdline_get_param+0x84>      <== NEVER TAKEN
    value[i++] = *p++;                                                                    
  103ffd:   88 51 ff                mov    %dl,-0x1(%ecx)                                 
  104000:   40                      inc    %eax                                           
    value[i] = '\0';                                                                      
  104001:   c6 01 00                movb   $0x0,(%ecx)                                    
  for (i=0 ; *p && i<length-1; ) {                                                        
  104004:   0f b6 10                movzbl (%eax),%edx                                    
  104007:   84 d2                   test   %dl,%dl                                        
  104009:   74 19                   je     104024 <rtems_bsp_cmdline_get_param+0x84>      
  10400b:   41                      inc    %ecx                                           
  10400c:   39 d8                   cmp    %ebx,%eax                                      
  10400e:   74 14                   je     104024 <rtems_bsp_cmdline_get_param+0x84>      
    if ( *p == '\"' ) {                                                                   
  104010:   80 fa 22                cmp    $0x22,%dl                                      
  104013:   75 db                   jne    103ff0 <rtems_bsp_cmdline_get_param+0x50>      <== NEVER TAKEN
    value[i++] = *p++;                                                                    
  104015:   88 51 ff                mov    %dl,-0x1(%ecx)                                 
  104018:   40                      inc    %eax                                           
      quotes++;                                                                           
  104019:   47                      inc    %edi                                           
    value[i] = '\0';                                                                      
  10401a:   c6 01 00                movb   $0x0,(%ecx)                                    
  for (i=0 ; *p && i<length-1; ) {                                                        
  10401d:   0f b6 10                movzbl (%eax),%edx                                    
  104020:   84 d2                   test   %dl,%dl                                        
  104022:   75 e7                   jne    10400b <rtems_bsp_cmdline_get_param+0x6b>      <== ALWAYS TAKEN
    return NULL;                                                                          
                                                                                          
  copy_string( p, value, length );                                                        
                                                                                          
  return value;                                                                           
}                                                                                         
  104024:   83 c4 1c                add    $0x1c,%esp                                     
  quotes=0;                                                                               
  104027:   89 f0                   mov    %esi,%eax                                      
}                                                                                         
  104029:   5b                      pop    %ebx                                           
  10402a:   5e                      pop    %esi                                           
  10402b:   5f                      pop    %edi                                           
  10402c:   5d                      pop    %ebp                                           
  10402d:   c3                      ret                                                   
  10402e:   66 90                   xchg   %ax,%ax                                        
  104030:   83 c4 1c                add    $0x1c,%esp                                     
    return NULL;                                                                          
  104033:   31 c0                   xor    %eax,%eax                                      
}                                                                                         
  104035:   5b                      pop    %ebx                                           
  104036:   5e                      pop    %esi                                           
  104037:   5f                      pop    %edi                                           
  104038:   5d                      pop    %ebp                                           
  104039:   c3                      ret                                                   
  10403a:   90                      nop                                                   
  10403b:   90                      nop                                                   
  10403c:   90                      nop                                                   
  10403d:   90                      nop                                                   
  10403e:   90                      nop                                                   
  10403f:   90                      nop                                                   
                                                                                          

00104080 <rtems_bsp_cmdline_get_param_rhs>: const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) {
  104080:   55                      push   %ebp                                           <== NOT EXECUTED
  104081:   89 e5                   mov    %esp,%ebp                                      <== NOT EXECUTED
  104083:   57                      push   %edi                                           <== NOT EXECUTED
  104084:   56                      push   %esi                                           <== NOT EXECUTED
  104085:   53                      push   %ebx                                           <== NOT EXECUTED
  104086:   83 ec 1c                sub    $0x1c,%esp                                     <== NOT EXECUTED
  104089:   8b 7d 08                mov    0x8(%ebp),%edi                                 <== NOT EXECUTED
  10408c:   8b 5d 0c                mov    0xc(%ebp),%ebx                                 <== NOT EXECUTED
  const char *p;                                                                          
  const char *rhs;                                                                        
  char       *d;                                                                          
                                                                                          
  p = rtems_bsp_cmdline_get_param( name, value, length );                                 
  10408f:   8b 45 10                mov    0x10(%ebp),%eax                                <== NOT EXECUTED
  104092:   89 3c 24                mov    %edi,(%esp)                                    <== NOT EXECUTED
  104095:   89 5c 24 04             mov    %ebx,0x4(%esp)                                 <== NOT EXECUTED
  104099:   89 44 24 08             mov    %eax,0x8(%esp)                                 <== NOT EXECUTED
  10409d:   e8 fe fe ff ff          call   103fa0 <rtems_bsp_cmdline_get_param>           <== NOT EXECUTED
  if ( !p )                                                                               
  1040a2:   85 c0                   test   %eax,%eax                                      
  p = rtems_bsp_cmdline_get_param( name, value, length );                                 
  1040a4:   89 c6                   mov    %eax,%esi                                      
  if ( !p )                                                                               
  1040a6:   74 44                   je     1040ec <rtems_bsp_cmdline_get_param_rhs+0x6c>  
    return NULL;                                                                          
                                                                                          
  rhs = &p[strlen(name)];                                                                 
  1040a8:   89 3c 24                mov    %edi,(%esp)                                    <== NOT EXECUTED
  1040ab:   e8 70 49 01 00          call   118a20 <strlen>                                <== NOT EXECUTED
  1040b0:   8d 14 06                lea    (%esi,%eax,1),%edx                             
  if ( *rhs != '=' )                                                                      
  1040b3:   80 3a 3d                cmpb   $0x3d,(%edx)                                   
  1040b6:   75 58                   jne    104110 <rtems_bsp_cmdline_get_param_rhs+0x90>  
    return NULL;                                                                          
                                                                                          
  rhs++;                                                                                  
  if ( *rhs == '\"' )                                                                     
  1040b8:   0f b6 42 01             movzbl 0x1(%edx),%eax                                 
  1040bc:   3c 22                   cmp    $0x22,%al                                      
  1040be:   74 40                   je     104100 <rtems_bsp_cmdline_get_param_rhs+0x80>  
  rhs++;                                                                                  
  1040c0:   8d 72 01                lea    0x1(%edx),%esi                                 
    rhs++;                                                                                
  for ( d=value ; *rhs ; )                                                                
  1040c3:   84 c0                   test   %al,%al                                        
  1040c5:   74 59                   je     104120 <rtems_bsp_cmdline_get_param_rhs+0xa0>  
  1040c7:   89 da                   mov    %ebx,%edx                                      
  1040c9:   8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi                          
    *d++ = *rhs++;                                                                        
  1040d0:   88 02                   mov    %al,(%edx)                                     
  1040d2:   46                      inc    %esi                                           
  1040d3:   88 c1                   mov    %al,%cl                                        
  for ( d=value ; *rhs ; )                                                                
  1040d5:   0f b6 06                movzbl (%esi),%eax                                    
    *d++ = *rhs++;                                                                        
  1040d8:   42                      inc    %edx                                           
  for ( d=value ; *rhs ; )                                                                
  1040d9:   84 c0                   test   %al,%al                                        
  1040db:   75 f3                   jne    1040d0 <rtems_bsp_cmdline_get_param_rhs+0x50>  
  if ( *(d-1) == '\"' )                                                                   
    d--;                                                                                  
  1040dd:   31 c0                   xor    %eax,%eax                                      
  1040df:   80 f9 22                cmp    $0x22,%cl                                      
  1040e2:   0f 94 c0                sete   %al                                            
  *d = '\0';                                                                              
                                                                                          
  return value;                                                                           
  1040e5:   89 de                   mov    %ebx,%esi                                      
    d--;                                                                                  
  1040e7:   29 c2                   sub    %eax,%edx                                      
  *d = '\0';                                                                              
  1040e9:   c6 02 00                movb   $0x0,(%edx)                                    
}                                                                                         
  1040ec:   83 c4 1c                add    $0x1c,%esp                                     
  1040ef:   89 f0                   mov    %esi,%eax                                      
  1040f1:   5b                      pop    %ebx                                           
  1040f2:   5e                      pop    %esi                                           
  1040f3:   5f                      pop    %edi                                           
  1040f4:   5d                      pop    %ebp                                           
  1040f5:   c3                      ret                                                   
  1040f6:   8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi                          
  1040fd:   8d 76 00                lea    0x0(%esi),%esi                                 
  for ( d=value ; *rhs ; )                                                                
  104100:   0f b6 42 02             movzbl 0x2(%edx),%eax                                 
    rhs++;                                                                                
  104104:   8d 72 02                lea    0x2(%edx),%esi                                 
  104107:   eb ba                   jmp    1040c3 <rtems_bsp_cmdline_get_param_rhs+0x43>  
  104109:   8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi                          
}                                                                                         
  104110:   83 c4 1c                add    $0x1c,%esp                                     
    return NULL;                                                                          
  104113:   31 f6                   xor    %esi,%esi                                      
}                                                                                         
  104115:   5b                      pop    %ebx                                           
  104116:   89 f0                   mov    %esi,%eax                                      
  104118:   5e                      pop    %esi                                           
  104119:   5f                      pop    %edi                                           
  10411a:   5d                      pop    %ebp                                           
  10411b:   c3                      ret                                                   
  10411c:   8d 74 26 00             lea    0x0(%esi,%eiz,1),%esi                          
  if ( *(d-1) == '\"' )                                                                   
  104120:   0f b6 4b ff             movzbl -0x1(%ebx),%ecx                                
  104124:   89 da                   mov    %ebx,%edx                                      
  104126:   eb b5                   jmp    1040dd <rtems_bsp_cmdline_get_param_rhs+0x5d>  
  104128:   90                      nop                                                   
  104129:   90                      nop                                                   
  10412a:   90                      nop                                                   
  10412b:   90                      nop                                                   
  10412c:   90                      nop                                                   
  10412d:   90                      nop                                                   
  10412e:   90                      nop                                                   
  10412f:   90                      nop