From: pogde prashant <pogde@cse.iitk.ac.in>
To: Tom Tromey <tromey@cygnus.com>
Cc: gcc@egcs.cygnus.com
Subject: Need Help
Date: Fri, 03 Dec 1999 14:02:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.10.9912040314590.3449-300000@csemt68.cse.iitk.ac.in> (raw)
In-Reply-To: <87g10ez91q.fsf@cygnus.com>
Hii
I was trying to port gcc to 8085.
but the compiler that is generated crashes on
some simple programs like
case 1:
main()
{
register int a;
register int b;
b=b+1;
}
though it works perfectly for
case 2:
main()
{
register int a;
register int b;
a=a+1;
}
the reason i figured out was :
in my machine description file
i have specified patterns for
(define_insn "addqi3"
[(set (match_operand:QI 0 "register_operand" "+a,a")
(plus:QI (match_operand:QI 1 "register_operand" "0,0")
(match_operand:QI 2 "nonmemory_operand" "i,r")))]
""
"@
ADI %2
ADD %2 "
)
where constraint "a" specifies that this operand must be in
accumalator(reg no 0).
and I also have pattern for all register to register move
instructions.
the rtl code that is generated for these two programs
i m sending with this mail as an attachment.
the problem is- (in first case )up to local register allocation
compiler works perfectly it also generates correct rtl codes.
but during "reload" phase it crashes.the reason is it assigns
accumalator(reg 0) to first variable "a" and pseudo register no "2"
to second variable before reload pass .
Now during reload pass it should find out that the values are in
wrong registers and add instruction pattern can not be applied on it.
so it should generate some extra register to
register mov instruction so that pattern for "add" instruction
in the md file can be applied.but it is crashing in this phase.
i have read just the documentation for how to port gcc to
new architectures that comes with gcc package.
I m not able to find out why the compiler is crashing.
I would highly appreciate if u can guide me that how to find
out and correct error in this case .can u plz also tell me if
some other kind of patterns will be required in md file for this
particular kind of translation.I think move patterns and pattern
for add instruction should be sufficient.I have mapped all data
types to 8bits.
thanx and regards
Prashant
WARNING: multiple messages have this Message-ID
From: pogde prashant <pogde@cse.iitk.ac.in>
To: Tom Tromey <tromey@cygnus.com>
Cc: gcc@egcs.cygnus.com
Subject: Need Help
Date: Fri, 31 Dec 1999 23:54:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.10.9912040314590.3449-300000@csemt68.cse.iitk.ac.in> (raw)
Message-ID: <19991231235400.wf9CpiJcA4OOgZKQ_CzBBeFiapAIQWXqJ4Q8KPgf5T8@z> (raw)
In-Reply-To: <87g10ez91q.fsf@cygnus.com>
Hii
I was trying to port gcc to 8085.
but the compiler that is generated crashes on
some simple programs like
case 1:
main()
{
register int a;
register int b;
b=b+1;
}
though it works perfectly for
case 2:
main()
{
register int a;
register int b;
a=a+1;
}
the reason i figured out was :
in my machine description file
i have specified patterns for
(define_insn "addqi3"
[(set (match_operand:QI 0 "register_operand" "+a,a")
(plus:QI (match_operand:QI 1 "register_operand" "0,0")
(match_operand:QI 2 "nonmemory_operand" "i,r")))]
""
"@
ADI %2
ADD %2 "
)
where constraint "a" specifies that this operand must be in
accumalator(reg no 0).
and I also have pattern for all register to register move
instructions.
the rtl code that is generated for these two programs
i m sending with this mail as an attachment.
the problem is- (in first case )up to local register allocation
compiler works perfectly it also generates correct rtl codes.
but during "reload" phase it crashes.the reason is it assigns
accumalator(reg 0) to first variable "a" and pseudo register no "2"
to second variable before reload pass .
Now during reload pass it should find out that the values are in
wrong registers and add instruction pattern can not be applied on it.
so it should generate some extra register to
register mov instruction so that pattern for "add" instruction
in the md file can be applied.but it is crashing in this phase.
i have read just the documentation for how to port gcc to
new architectures that comes with gcc package.
I m not able to find out why the compiler is crashing.
I would highly appreciate if u can guide me that how to find
out and correct error in this case .can u plz also tell me if
some other kind of patterns will be required in md file for this
particular kind of translation.I think move patterns and pattern
for add instruction should be sufficient.I have mapped all data
types to 8bits.
thanx and regards
Prashant
next prev parent reply other threads:[~1999-12-03 14:02 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-16 7:24 -MD behavior does not match documentation I Lee Hetherington
1999-09-16 8:03 ` Richard Hadsell
1999-09-16 8:16 ` I Lee Hetherington
1999-09-30 18:02 ` I Lee Hetherington
1999-09-30 18:02 ` Richard Hadsell
1999-09-16 13:58 ` Jamie Lokier
1999-09-16 17:15 ` Tom Tromey
1999-09-30 18:02 ` Tom Tromey
1999-11-27 18:46 ` Tom Tromey
1999-11-30 23:37 ` Tom Tromey
1999-12-03 14:02 ` pogde prashant [this message]
1999-12-03 15:34 ` Need Help Joern Rennecke
1999-12-31 23:54 ` Joern Rennecke
1999-12-31 23:54 ` pogde prashant
1999-09-30 18:02 ` -MD behavior does not match documentation Jamie Lokier
1999-09-30 18:02 ` I Lee Hetherington
2000-01-27 18:46 need help Krishnan Palani
2000-01-27 20:22 ` Eric Christopher
2003-07-22 13:39 ggbg ddfd
2003-07-22 13:48 ` ggbg ddfd
2003-07-22 13:55 ` Gerald Pfeifer
2003-09-26 11:46 Eitan
2003-09-26 12:16 ` Jon Beniston
2004-08-31 12:49 Need Help Kolingba Arthur
2004-09-01 19:49 ` James E Wilson
2005-12-15 8:16 Need help Ivan Petrov
2006-06-28 21:54 ammalik
2006-06-28 23:27 ` Mike Stump
2006-07-12 1:52 ` ammalik
2006-07-12 4:41 ` Ian Lance Taylor
2008-02-25 12:24 need help Mag cool
2008-02-25 13:13 ` Alexey Zaytsev
2008-02-25 12:24 Mag cool
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=Pine.LNX.4.10.9912040314590.3449-300000@csemt68.cse.iitk.ac.in \
--to=pogde@cse.iitk.ac.in \
--cc=gcc@egcs.cygnus.com \
--cc=tromey@cygnus.com \
/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).