Update copyright year range in all GDB files.
[deliverable/binutils-gdb.git] / gdb / features / riscv / rebuild-csr-xml.sh
CommitLineData
b5ffee31
AB
1#! /bin/bash
2
3RISCV_OPC_FILE=$1
4RISCV_FEATURE_DIR=$2
5
6function gen_csr_xml ()
7{
8 bitsize=$1
9
10 cat <<EOF
11<?xml version="1.0"?>
42a4f53d 12<!-- Copyright (C) 2018-2019 Free Software Foundation, Inc.
b5ffee31
AB
13
14 Copying and distribution of this file, with or without modification,
15 are permitted in any medium without royalty provided the copyright
16 notice and this notice are preserved. -->
17
18<!DOCTYPE feature SYSTEM "gdb-target.dtd">
19<feature name="org.gnu.gdb.riscv.csr">
20EOF
21
22 grep "^DECLARE_CSR(" ${RISCV_OPC_FILE} \
23 | sed -e "s!DECLARE_CSR(\(.*\), .*! <reg name=\"\1\" bitsize=\"$bitsize\"/>!"
24
25 echo "</feature>"
26}
27
28gen_csr_xml 32 > ${RISCV_FEATURE_DIR}/32bit-csr.xml
29gen_csr_xml 64 > ${RISCV_FEATURE_DIR}/64bit-csr.xml
This page took 0.029184 seconds and 4 git commands to generate.