Mercurial > hg > index.cgi
comparison lwasm/pseudo.c @ 251:0e4a9b21ad7b
Make the complaint about negative block/reservation sizes show value.
Cause the error for RM[BDQ] and ZM[BDQ] report the size requested
when complaining about a negative reservation amount.
author | William Astle <lost@l-w.ca> |
---|---|
date | Fri, 25 Jan 2013 22:43:10 -0700 |
parents | 7887a48b74df |
children | 346966cffeef |
comparison
equal
deleted
inserted
replaced
250:644f8abf87dc | 251:0e4a9b21ad7b |
---|---|
572 | 572 |
573 if (lw_expr_istype(expr, lw_expr_type_int)) | 573 if (lw_expr_istype(expr, lw_expr_type_int)) |
574 { | 574 { |
575 if (lw_expr_intval(expr) < 0) | 575 if (lw_expr_intval(expr) < 0) |
576 { | 576 { |
577 lwasm_register_error(as, l, "Negative reservation sizes make no sense!"); | 577 lwasm_register_error(as, l, "Negative reservation sizes make no sense! (%d)", lw_expr_intval(expr)); |
578 l -> len = 0; | 578 l -> len = 0; |
579 l -> dlen = 0; | 579 l -> dlen = 0; |
580 return; | 580 return; |
581 } | 581 } |
582 if (l -> inmod) | 582 if (l -> inmod) |
656 | 656 |
657 if (lw_expr_istype(expr, lw_expr_type_int)) | 657 if (lw_expr_istype(expr, lw_expr_type_int)) |
658 { | 658 { |
659 if (lw_expr_intval(expr) < 0) | 659 if (lw_expr_intval(expr) < 0) |
660 { | 660 { |
661 lwasm_register_error(as, l, "Negative reservation sizes make no sense!"); | 661 lwasm_register_error(as, l, "Negative reservation sizes make no sense! (%d)", lw_expr_intval(expr)); |
662 l -> len = 0; | 662 l -> len = 0; |
663 l -> dlen = 0; | 663 l -> dlen = 0; |
664 return; | 664 return; |
665 } | 665 } |
666 if (l -> inmod) | 666 if (l -> inmod) |
740 | 740 |
741 if (lw_expr_istype(expr, lw_expr_type_int)) | 741 if (lw_expr_istype(expr, lw_expr_type_int)) |
742 { | 742 { |
743 if (lw_expr_intval(expr) < 0) | 743 if (lw_expr_intval(expr) < 0) |
744 { | 744 { |
745 lwasm_register_error(as, l, "Negative reservation sizes make no sense!"); | 745 lwasm_register_error(as, l, "Negative reservation sizes make no sense! (%d)", lw_expr_intval(expr)); |
746 l -> len = 0; | 746 l -> len = 0; |
747 l -> dlen = 0; | 747 l -> dlen = 0; |
748 return; | 748 return; |
749 } | 749 } |
750 if (l -> inmod) | 750 if (l -> inmod) |
788 | 788 |
789 if (lw_expr_istype(expr, lw_expr_type_int)) | 789 if (lw_expr_istype(expr, lw_expr_type_int)) |
790 { | 790 { |
791 if (lw_expr_intval(expr) < 0) | 791 if (lw_expr_intval(expr) < 0) |
792 { | 792 { |
793 lwasm_register_error(as, l, "Negative block sizes make no sense!"); | 793 lwasm_register_error(as, l, "Negative block sizes make no sense! (%d)", lw_expr_intval(expr)); |
794 l -> len = 0; | 794 l -> len = 0; |
795 return; | 795 return; |
796 } | 796 } |
797 l -> len = lw_expr_intval(expr) * 4; | 797 l -> len = lw_expr_intval(expr) * 4; |
798 } | 798 } |
837 | 837 |
838 if (lw_expr_istype(expr, lw_expr_type_int)) | 838 if (lw_expr_istype(expr, lw_expr_type_int)) |
839 { | 839 { |
840 if (lw_expr_intval(expr) < 0) | 840 if (lw_expr_intval(expr) < 0) |
841 { | 841 { |
842 lwasm_register_error(as, l, "Negative block sizes make no sense!"); | 842 lwasm_register_error(as, l, "Negative block sizes make no sense! (%d)", lw_expr_intval(expr)); |
843 l -> len = 0; | 843 l -> len = 0; |
844 return; | 844 return; |
845 } | 845 } |
846 l -> len = lw_expr_intval(expr) * 2; | 846 l -> len = lw_expr_intval(expr) * 2; |
847 } | 847 } |
885 | 885 |
886 if (lw_expr_istype(expr, lw_expr_type_int)) | 886 if (lw_expr_istype(expr, lw_expr_type_int)) |
887 { | 887 { |
888 if (lw_expr_intval(expr) < 0) | 888 if (lw_expr_intval(expr) < 0) |
889 { | 889 { |
890 lwasm_register_error(as, l, "Negative block sizes make no sense!"); | 890 lwasm_register_error(as, l, "Negative block sizes make no sense! (%d)", lw_expr_intval(expr)); |
891 l -> len = 0; | 891 l -> len = 0; |
892 return; | 892 return; |
893 } | 893 } |
894 l -> len = lw_expr_intval(expr); | 894 l -> len = lw_expr_intval(expr); |
895 } | 895 } |