annotate contrib/vim-gcc-dev/syntax/gcc-rtl.vim @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 84e7813d76e9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
131
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
1 " Syntax highlighting rules for RTL dump files (for Vim).
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
2 "
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
3 " Copyright (C) 2018 Free Software Foundation, Inc.
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
4 "
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
5 " This script is free software; you can redistribute it and/or modify
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
6 " it under the terms of the GNU General Public License as published by
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
7 " the Free Software Foundation; either version 3, or (at your option)
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
8 " any later version
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
9
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
10
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
11 " Do not continue, if syntax is already enabled in current buffer.
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
12 if exists("b:current_syntax")
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
13 finish
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
14 endif
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
15
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
16 " General-purpose comments.
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
17 syn match rtlComment ";;.*$"
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
18
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
19 syn keyword rtlInstruction debug_expr insn_list int_list sequence
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
20 \ address debug_insn insn expr_list
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
21 \ jump_table_data barrier code_label
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
22 \ cond_exec parallel asm_input asm_operands
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
23 \ unspec unspec_volatile addr_vec
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
24 \ addr_diff_vec prefetch set use clobber
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
25 \ call return simple_return eh_return
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
26 \ trap_if scratch strict_low_part concat concatn
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
27 \ mem label_ref symbol_ref cc0 compare plus minus
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
28 \ neg mult ss_mult us_mult div ss_div us_div mod
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
29 \ udiv umod and ior xor not ashift rotate ashiftrt
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
30 \ lshiftrt rotatert smin smax umin umax pre_dec
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
31 \ pre_inc post_dec post_inc pre_modify post_modify
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
32 \ unordered ordered uneq unge ungt unle unlt ltgt sign_extend
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
33 \ zero_extend truncate float_extend float_truncate
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
34 \ float fix unsigned_float unsigned_fix fract_convert
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
35 \ unsigned_fract_convert sat_fract unsigned_sat_fract
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
36 \ abs sqrt bswap ffs clrsb clz ctz popcount parity
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
37 \ sign_extract zero_extract high lo_sum vec_merge
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
38 \ vec_select vec_concat vec_duplicate vec_series ss_plus
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
39 \ us_plus ss_minus ss_neg us_neg ss_abs ss_ashift
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
40 \ us_ashift us_minus ss_truncate us_truncate fma
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
41 \ entry_value exclusion_set presence_set final_presence_set
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
42 \ absence_set final_absence_set automata_option attr set_attr
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
43 \ set_attr_alternative eq_attr eq_attr_alt attr_flag cond
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
44 syn keyword rtlConditional call_insn jump_insn if_then_else
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
45 \ eq ne gt gtu lt ltu ge geu le leu
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
46 syn keyword rtlNote note barrier code_label
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
47 syn keyword rtlVariableLoation var_location
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
48 syn keyword rtlPcRegister pc
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
49
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
50 syn keyword rtlModes VOID BLK BI QI HI SI DI TI SF DF CC QQ HQ SQ
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
51 \ DQ TQ UQQ UHQ USQ UDQ UTQ HA SA DA TA UHA
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
52 \ USA UDA UTA SD DD TD
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
53
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
54 " String literals
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
55 syn region rtlString start=/\v"/ skip=/\v\\./ end=/\v"/
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
56
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
57 syn match rtlNoteInsn "NOTE_INSN_[A-Z_]*"
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
58 syn match rtlIntegerConstant "\vconst_int -?\d+"
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
59 syn match rtlFloatConstant "\vconst_double:[A-Z]+ -?\d*\.\d+(e\+\d+)?"
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
60 syn match rtlRegister "\vreg(\/[a-z])?:[A-Z0-9]+ \d+ [a-z0-9]+"
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
61 syn match rtlLocation /\v"[^"]*":\d+/
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
62
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
63 hi def link rtlInstruction Statement
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
64 hi def link rtlConditional Conditional
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
65 hi def link rtlNote Debug
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
66 hi def link rtlNoteInsn Debug
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
67 hi def link rtlIntegerConstant Number
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
68 hi def link rtlFloatConstant Number
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
69 hi def link rtlRegister Type
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
70 hi def link rtlPcRegister Type
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
71 hi def link rtlModes Type
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
72 hi def link rtlVariableLoation Debug
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
73 hi def link rtlComment Comment
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
74 hi def link rtlLocation Debug
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
75 hi def link rtlString String
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
76
84e7813d76e9 gcc-8.2
mir3636
parents:
diff changeset
77 let b:current_syntax = "gcc-rtl"