This is the mail archive of the
mailing list for the GCC project.
oddities in the moxie gcc backend
- From: Mikael Pettersson <mikpelinux at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Cc: Anthony Green <green at moxielogic dot com>
- Date: Sun, 15 Jan 2017 15:02:58 +0100
- Subject: oddities in the moxie gcc backend
- Authentication-results: sourceware.org; auth=none
I have a toy backend based on the moxie backend as a template. During its
development I found some oddities in the moxie backend that may be bugs.
1. The REGNO_OK_FOR_INDEX_P(NUM) macro in moxie.h is:
#define REGNO_OK_FOR_INDEX_P(NUM) MOXIE_FP
Since MOXIE_FP is 0, this returns false for every register. Should the body
be a literal 0, or some comparison between NUM and MOXIE_FP?
2. I see no actual use of MOXIE_PC or the SPECIAL_REGS register class. Could they
be deleted (with adjustments for decrementing MOXIE_CC)?
3. moxie_compute_frame () doesn't take !fixed_regs[regno] into account, which the
related loops in moxie_expand_prologue () and moxie_expand_epilogue () do. Bug?
There are also some minor nits:
4. The comment above `size_for_adjusting_sp' states it's used in expand_epilogue(),
which it isn't.
5. The "Compute this since .." comment in moxie_initial_elimination_offset () should
probably refer to callee_saved_reg_size not local_vars_size, to match the code.
6. There are two idential definitions of TRULY_NOOP_TRUNCATION(op,ip) in moxie.h.
The first one looks misplaced and should probably be deleted.