From: RICHU NORMAN <richunorman@cusat.ac.in>
To: gcc@gcc.gnu.org
Subject: Adding log files to gcc dump and adding testcase-rtl
Date: Wed, 25 May 2022 10:25:57 +0530 [thread overview]
Message-ID: <CAPhpueW+xMCvFXt5X64DML8naiuY+WX+1LPLRS70jazaP8qe9w@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 650 bytes --]
Hi,
I am a beginner in gcc. I am trying to add an instruction to riscv-gcc.It
would be helpful could help with a few tips .
1.How to write comments to rtl or create a custom log file to log comments
to rtl dump?
2.How to run testsuite ?
3.Is there a way to directly run an rtl test case? Like giving rtl input
and checking the generated asm.(Like in the attachment which is posted in
bugzilla[ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82815 ])
Please suggest a way to run the gcc-testsuite with these cases. Pfa
--
Richu Norman
Research Scholar
Department of Computer Science
Cochin University of Science and Technology
Ph : (+91)-8848455627
[-- Attachment #2: testcase_read-rtl.c --]
[-- Type: text/x-c-code, Size: 3109 bytes --]
/* { dg-do compile } */
/* { dg-options "-march=armv7e-m -mfloat-abi=hard -mfpu=fpv5-d16" } */
double __RTL (startwith ("mach")) foo (void)
{
(function "foo"
(insn-chain
(cnote 1 NOTE_INSN_DELETED)
(cnote 3 [bb 2] NOTE_INSN_BASIC_BLOCK)
(cinsn/f 16 (parallel [
(set (mem/c:BLK (pre_modify:SI (reg/f:SI sp)
(plus:SI (reg/f:SI sp)
(const_int -8))) [1 A8])
(unspec:BLK [
(reg:SI r4)
] UNSPEC_PUSH_MULT))
(use (reg/f:SI r7))
]) "foo.c":2
(expr_list:REG_FRAME_RELATED_EXPR (sequence [
(set/f (reg/f:SI sp)
(plus:SI (reg/f:SI sp)
(const_int -8)))
(set/f (mem/c:SI (reg/f:SI sp) [1 S4 A32])
(reg:SI r4))
(set/f (mem/c:SI (plus:SI (reg/f:SI sp)
(const_int 4)) [1 S4 A32])
(reg/f:SI r7))
])))
(cinsn/f 17 (set (reg/f:SI r7)
(plus:SI (reg/f:SI sp)
(const_int 0))) "foo.c":2)
(cnote 18 NOTE_INSN_PROLOGUE_END)
(cnote 2 NOTE_INSN_FUNCTION_BEG)
(cinsn 5 (set (reg:DF r3 [orig:110 _1 ] [110])
(const_double:DF 1.0e+0 [0x0.8p+1])) "foo.c":3)
(cinsn 8 (set (reg:DF s14 [orig:111 <retval> ] [111])
(reg:DF r3 [orig:110 _1 ] [110])) "foo.c":3)
(cinsn 12 (set (reg/i:DF s0)
(reg:DF s14 [orig:111 <retval> ] [111])) "foo.c":4)
(cinsn 13 (use (reg/i:DF s0)) "foo.c":4)
(cnote 19 NOTE_INSN_EPILOGUE_BEG)
(cinsn 20 (unspec_volatile [
(const_int 0)
] VUNSPEC_BLOCKAGE) "foo.c":4)
(cinsn/f 21 (set (reg/f:SI sp)
(reg/f:SI r7)) "foo.c":4
(expr_list:REG_CFA_ADJUST_CFA (set (reg/f:SI sp)
(reg/f:SI r7))))
(cinsn 22 (unspec:SI [
(reg/f:SI sp)
] UNSPEC_REGISTER_USE) "foo.c":4)
(cinsn/f 23 (parallel [
(set/f (reg/f:SI sp)
(plus:SI (reg/f:SI sp)
(const_int 8)))
(set/f (reg:SI r4)
(mem/c:SI (reg/f:SI sp) [1 S4 A32]))
(set/f (reg/f:SI r7)
(mem/c:SI (plus:SI (reg/f:SI sp)
(const_int 4)) [1 S4 A32]))
]) "foo.c":4
(expr_list:REG_CFA_ADJUST_CFA (set (reg/f:SI sp)
(plus:SI (reg/f:SI sp)
(const_int 8)))
(expr_list:REG_CFA_RESTORE (reg/f:SI r7)
(expr_list:REG_CFA_RESTORE (reg:SI r4)))))
(cjump_insn 24 (simple_return) "foo.c":4)
(cbarrier 25)
(cnote 15 NOTE_INSN_DELETED)
) ;; insn-chain
(crtl
(return_rtx
(reg/i:DF s0)
) ;; return_rtx
) ;; crtl
) ;; function "foo"
}
next reply other threads:[~2022-05-25 4:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-25 4:55 RICHU NORMAN [this message]
2022-05-25 10:44 ` David Malcolm
2022-05-25 10:54 ` David Malcolm
2022-05-25 11:02 ` RICHU NORMAN
2022-05-25 12:39 ` David Malcolm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPhpueW+xMCvFXt5X64DML8naiuY+WX+1LPLRS70jazaP8qe9w@mail.gmail.com \
--to=richunorman@cusat.ac.in \
--cc=gcc@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).