Commit 6e4302ec by Per Bothner Committed by Per Bothner

jcf-dump.c (print_constant): Fix fencepost error so "Float" and "Double" are…

jcf-dump.c (print_constant): Fix fencepost error so "Float" and "Double" are printed at verbosity 1.


	* jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
	"Double" are printed at verbosity 1.

	* jcf-dump.c (main):  Disable flag_print_attributes if --javap.

	* jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.

From-SVN: r45296
parent 9f5b774b
2001-08-30 Per Bothner <per@bothner.com>
* jcf-dump.c (print_constant): Fix fencepost error so "Float" and
"Double" are printed at verbosity 1.
* jcf-dump.c (main): Disable flag_print_attributes if --javap.
* jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
2001-08-28 Per Bothner <per@bothner.com> 2001-08-28 Per Bothner <per@bothner.com>
* jcf-write.c (generate_bytecode_insns): For increments and * jcf-write.c (generate_bytecode_insns): For increments and
......
...@@ -504,7 +504,7 @@ DEFUN(print_constant, (out, jcf, index, verbosity), ...@@ -504,7 +504,7 @@ DEFUN(print_constant, (out, jcf, index, verbosity),
case CONSTANT_Float: case CONSTANT_Float:
{ {
jfloat fnum = JPOOL_FLOAT (jcf, index); jfloat fnum = JPOOL_FLOAT (jcf, index);
fprintf (out, "%s%.10g", verbosity > 1 ? "Float " : "", (double) fnum); fprintf (out, "%s%.10g", verbosity > 0 ? "Float " : "", (double) fnum);
if (verbosity > 1) if (verbosity > 1)
fprintf (out, ", bits = 0x%08lx", (long) (* (int32 *) &fnum)); fprintf (out, ", bits = 0x%08lx", (long) (* (int32 *) &fnum));
break; break;
...@@ -512,7 +512,7 @@ DEFUN(print_constant, (out, jcf, index, verbosity), ...@@ -512,7 +512,7 @@ DEFUN(print_constant, (out, jcf, index, verbosity),
case CONSTANT_Double: case CONSTANT_Double:
{ {
jdouble dnum = JPOOL_DOUBLE (jcf, index); jdouble dnum = JPOOL_DOUBLE (jcf, index);
fprintf (out, "%s%.20g", verbosity > 1 ? "Double " : "", dnum); fprintf (out, "%s%.20g", verbosity > 0 ? "Double " : "", dnum);
if (verbosity > 1) if (verbosity > 1)
{ {
int32 hi, lo; int32 hi, lo;
...@@ -889,6 +889,7 @@ DEFUN(main, (argc, argv), ...@@ -889,6 +889,7 @@ DEFUN(main, (argc, argv),
case OPT_JAVAP: case OPT_JAVAP:
flag_javap_compatible++; flag_javap_compatible++;
flag_print_constant_pool = 0; flag_print_constant_pool = 0;
flag_print_attributes = 0;
break; break;
default: default:
...@@ -1201,10 +1202,10 @@ DEFUN(disassemble_method, (jcf, byte_ops, len), ...@@ -1201,10 +1202,10 @@ DEFUN(disassemble_method, (jcf, byte_ops, len),
#define SPECIAL_IINC(OPERAND_TYPE) \ #define SPECIAL_IINC(OPERAND_TYPE) \
i = saw_wide ? IMMEDIATE_u2 : IMMEDIATE_u1; \ i = saw_wide ? IMMEDIATE_u2 : IMMEDIATE_u1; \
fprintf (out, " %ld", (long) i); \ fprintf (out, " %d", i); \
INT_temp = saw_wide ? IMMEDIATE_s2 : IMMEDIATE_s1; \ i = saw_wide ? IMMEDIATE_s2 : IMMEDIATE_s1; \
saw_wide = 0; \ saw_wide = 0; \
fprintf (out, " %ld", (long) INT_temp) fprintf (out, " %d", i)
#define SPECIAL_WIDE(OPERAND_TYPE) \ #define SPECIAL_WIDE(OPERAND_TYPE) \
saw_wide = 1; saw_wide = 1;
......
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