17
17
more details.
18
18
19
19
You should have received a copy of the GNU General Public License
20
- along with this program; if not, write to the Free Software
21
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
20
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
22
21
23
22
/* Start of qemu specific additions. Mostly this is stub definitions
24
23
for things we don't care about. */
25
24
26
25
#include "dis-asm.h"
27
- #define FALSE 0
28
- #define TRUE (!FALSE)
29
26
#define ATTRIBUTE_UNUSED __attribute__((unused))
30
27
#define ISSPACE (x ) ((x) == ' ' || (x) == '\t' || (x) == '\n')
31
28
@@ -1532,7 +1529,7 @@ static unsigned int regname_selected = 1;
1532
1529
#define NUM_ARM_REGNAMES NUM_ELEM (regnames)
1533
1530
#define arm_regnames regnames[regname_selected].reg_names
1534
1531
1535
- static bfd_boolean force_thumb = FALSE ;
1532
+ static bfd_boolean force_thumb = false ;
1536
1533
1537
1534
/* Current IT instruction state. This contains the same state as the IT
1538
1535
bits in the CPSR. */
@@ -1629,7 +1626,7 @@ arm_decode_shift (long given, fprintf_ftype func, void *stream,
1629
1626
}
1630
1627
1631
1628
/* Print one coprocessor instruction on INFO->STREAM.
1632
- Return TRUE if the instuction matched, FALSE if this is not a
1629
+ Return true if the instuction matched, false if this is not a
1633
1630
recognised coprocessor instruction. */
1634
1631
1635
1632
static bfd_boolean
@@ -2122,10 +2119,10 @@ print_insn_coprocessor (bfd_vma pc, struct disassemble_info *info, long given,
2122
2119
else
2123
2120
func (stream , "%c" , * c );
2124
2121
}
2125
- return TRUE ;
2122
+ return true ;
2126
2123
}
2127
2124
}
2128
- return FALSE ;
2125
+ return false ;
2129
2126
}
2130
2127
2131
2128
static void
@@ -2219,7 +2216,7 @@ print_arm_address (bfd_vma pc, struct disassemble_info *info, long given)
2219
2216
}
2220
2217
2221
2218
/* Print one neon instruction on INFO->STREAM.
2222
- Return TRUE if the instuction matched, FALSE if this is not a
2219
+ Return true if the instuction matched, false if this is not a
2223
2220
recognised neon instruction. */
2224
2221
2225
2222
static bfd_boolean
@@ -2245,7 +2242,7 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
2245
2242
else if ((given & 0xff000000 ) == 0xf9000000 )
2246
2243
given ^= 0xf9000000 ^ 0xf4000000 ;
2247
2244
else
2248
- return FALSE ;
2245
+ return false ;
2249
2246
}
2250
2247
2251
2248
for (insn = neon_opcodes ; insn -> assembler ; insn ++ )
@@ -2335,34 +2332,34 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
2335
2332
{
2336
2333
int amask = (1 << size ) - 1 ;
2337
2334
if ((idx_align & (1 << size )) != 0 )
2338
- return FALSE ;
2335
+ return false ;
2339
2336
if (size > 0 )
2340
2337
{
2341
2338
if ((idx_align & amask ) == amask )
2342
2339
align = 8 << size ;
2343
2340
else if ((idx_align & amask ) != 0 )
2344
- return FALSE ;
2341
+ return false ;
2345
2342
}
2346
2343
}
2347
2344
break ;
2348
2345
2349
2346
case 2 :
2350
2347
if (size == 2 && (idx_align & 2 ) != 0 )
2351
- return FALSE ;
2348
+ return false ;
2352
2349
align = (idx_align & 1 ) ? 16 << size : 0 ;
2353
2350
break ;
2354
2351
2355
2352
case 3 :
2356
2353
if ((size == 2 && (idx_align & 3 ) != 0 )
2357
2354
|| (idx_align & 1 ) != 0 )
2358
- return FALSE ;
2355
+ return false ;
2359
2356
break ;
2360
2357
2361
2358
case 4 :
2362
2359
if (size == 2 )
2363
2360
{
2364
2361
if ((idx_align & 3 ) == 3 )
2365
- return FALSE ;
2362
+ return false ;
2366
2363
align = (idx_align & 3 ) * 64 ;
2367
2364
}
2368
2365
else
@@ -2671,10 +2668,10 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
2671
2668
else
2672
2669
func (stream , "%c" , * c );
2673
2670
}
2674
- return TRUE ;
2671
+ return true ;
2675
2672
}
2676
2673
}
2677
- return FALSE ;
2674
+ return false ;
2678
2675
}
2679
2676
2680
2677
/* Print one ARM instruction from PC on INFO->STREAM. */
@@ -2686,10 +2683,10 @@ print_insn_arm_internal (bfd_vma pc, struct disassemble_info *info, long given)
2686
2683
void * stream = info -> stream ;
2687
2684
fprintf_ftype func = info -> fprintf_func ;
2688
2685
2689
- if (print_insn_coprocessor (pc , info , given , FALSE ))
2686
+ if (print_insn_coprocessor (pc , info , given , false ))
2690
2687
return ;
2691
2688
2692
- if (print_insn_neon (info , given , FALSE ))
2689
+ if (print_insn_neon (info , given , false ))
2693
2690
return ;
2694
2691
2695
2692
for (insn = arm_opcodes ; insn -> assembler ; insn ++ )
@@ -3322,10 +3319,10 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
3322
3319
void * stream = info -> stream ;
3323
3320
fprintf_ftype func = info -> fprintf_func ;
3324
3321
3325
- if (print_insn_coprocessor (pc , info , given , TRUE ))
3322
+ if (print_insn_coprocessor (pc , info , given , true ))
3326
3323
return ;
3327
3324
3328
- if (print_insn_neon (info , given , TRUE ))
3325
+ if (print_insn_neon (info , given , true ))
3329
3326
return ;
3330
3327
3331
3328
for (insn = thumb32_opcodes ; insn -> assembler ; insn ++ )
@@ -3460,7 +3457,7 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
3460
3457
unsigned int op = (given & 0x00000f00 ) >> 8 ;
3461
3458
unsigned int i12 = (given & 0x00000fff );
3462
3459
unsigned int i8 = (given & 0x000000ff );
3463
- bfd_boolean writeback = FALSE , postind = FALSE ;
3460
+ bfd_boolean writeback = false , postind = false ;
3464
3461
int offset = 0 ;
3465
3462
3466
3463
func (stream , "[%s" , arm_regnames [Rn ]);
@@ -3490,22 +3487,22 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
3490
3487
3491
3488
case 0xF : /* 8-bit + preindex with wb */
3492
3489
offset = i8 ;
3493
- writeback = TRUE ;
3490
+ writeback = true ;
3494
3491
break ;
3495
3492
3496
3493
case 0xD : /* 8-bit - preindex with wb */
3497
3494
offset = - i8 ;
3498
- writeback = TRUE ;
3495
+ writeback = true ;
3499
3496
break ;
3500
3497
3501
3498
case 0xB : /* 8-bit + postindex */
3502
3499
offset = i8 ;
3503
- postind = TRUE ;
3500
+ postind = true ;
3504
3501
break ;
3505
3502
3506
3503
case 0x9 : /* 8-bit - postindex */
3507
3504
offset = - i8 ;
3508
- postind = TRUE ;
3505
+ postind = true ;
3509
3506
break ;
3510
3507
3511
3508
default :
@@ -3878,12 +3875,12 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info)
3878
3875
unsigned char b [4 ];
3879
3876
long given ;
3880
3877
int status ;
3881
- int is_thumb = FALSE ;
3882
- int is_data = FALSE ;
3878
+ int is_thumb = false ;
3879
+ int is_data = false ;
3883
3880
unsigned int size = 4 ;
3884
3881
void (* printer ) (bfd_vma , struct disassemble_info * , long );
3885
3882
#if 0
3886
- bfd_boolean found = FALSE ;
3883
+ bfd_boolean found = false ;
3887
3884
3888
3885
if (info -> disassembler_options )
3889
3886
{
@@ -3906,7 +3903,7 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info)
3906
3903
if (pc <= last_mapping_addr )
3907
3904
last_mapping_sym = -1 ;
3908
3905
is_thumb = (last_type == MAP_THUMB );
3909
- found = FALSE ;
3906
+ found = false ;
3910
3907
/* Start scanning at the start of the function, or wherever
3911
3908
we finished last time. */
3912
3909
n = info -> symtab_pos + 1 ;
@@ -3924,7 +3921,7 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info)
3924
3921
&& get_sym_code_type (info , n , & type ))
3925
3922
{
3926
3923
last_sym = n ;
3927
- found = TRUE ;
3924
+ found = true ;
3928
3925
}
3929
3926
}
3930
3927
@@ -3941,7 +3938,7 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info)
3941
3938
if (get_sym_code_type (info , n , & type ))
3942
3939
{
3943
3940
last_sym = n ;
3944
- found = TRUE ;
3941
+ found = true ;
3945
3942
break ;
3946
3943
}
3947
3944
}
@@ -4013,7 +4010,7 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info)
4013
4010
#endif
4014
4011
4015
4012
if (force_thumb )
4016
- is_thumb = TRUE ;
4013
+ is_thumb = true ;
4017
4014
4018
4015
info -> bytes_per_line = 4 ;
4019
4016
0 commit comments