Commit ed8b71cc by Nagaraju Mekala Committed by Michael Eager

microblaze.c: Extend mcpu version format

2013-11-26  Nagaraju Mekala <nagaraju.mekala@xilinx.com>

 * gcc/config/microblaze/microblaze.c: Extend mcpu version format

From-SVN: r207680
parent 9b5414c6
2013-11-26 Nagaraju Mekala <nagaraju.mekala@xilinx.com>
* config/microblaze/microblaze.c: Extend mcpu version format
2014-02-10 David Holsgrove <david.holsgrove@xilinx.com>
* config/microblaze/microblaze.h: Define SIZE_TYPE and PTRDIFF_TYPE.
......
......@@ -1612,21 +1612,28 @@ static int
microblaze_version_to_int (const char *version)
{
const char *p, *v;
const char *tmpl = "vX.YY.Z";
const char *tmpl = "vXX.YY.Z";
int iver = 0;
p = version;
v = tmpl;
while (*v)
while (*p)
{
if (*v == 'X')
{ /* Looking for major */
if (!(*p >= '0' && *p <= '9'))
return -1;
iver += (int) (*p - '0');
iver *= 10;
}
if (*p == '.')
{
*v++;
}
else
{
if (!(*p >= '0' && *p <= '9'))
return -1;
iver += (int) (*p - '0');
iver *= 10;
}
}
else if (*v == 'Y')
{ /* Looking for minor */
if (!(*p >= '0' && *p <= '9'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment