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