1" Syntax highlighting rules for RTL dump files (for Vim). 2" 3" Copyright (C) 2018 Free Software Foundation, Inc. 4" 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 9 10 11" Do not continue, if syntax is already enabled in current buffer. 12if exists("b:current_syntax") 13 finish 14endif 15 16" General-purpose comments. 17syn match rtlComment ";;.*$" 18 19syn 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 44syn keyword rtlConditional call_insn jump_insn if_then_else 45 \ eq ne gt gtu lt ltu ge geu le leu 46syn keyword rtlNote note barrier code_label 47syn keyword rtlVariableLoation var_location 48syn keyword rtlPcRegister pc 49 50syn 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 53 54" String literals 55syn region rtlString start=/\v"/ skip=/\v\\./ end=/\v"/ 56 57syn match rtlNoteInsn "NOTE_INSN_[A-Z_]*" 58syn match rtlIntegerConstant "\vconst_int -?\d+" 59syn match rtlFloatConstant "\vconst_double:[A-Z]+ -?\d*\.\d+(e\+\d+)?" 60syn match rtlRegister "\vreg(\/[a-z])?:[A-Z0-9]+ \d+ [a-z0-9]+" 61syn match rtlLocation /\v"[^"]*":\d+/ 62 63hi def link rtlInstruction Statement 64hi def link rtlConditional Conditional 65hi def link rtlNote Debug 66hi def link rtlNoteInsn Debug 67hi def link rtlIntegerConstant Number 68hi def link rtlFloatConstant Number 69hi def link rtlRegister Type 70hi def link rtlPcRegister Type 71hi def link rtlModes Type 72hi def link rtlVariableLoation Debug 73hi def link rtlComment Comment 74hi def link rtlLocation Debug 75hi def link rtlString String 76 77let b:current_syntax = "gcc-rtl" 78