Browse Source

* handle addresses just like integers in thlcgwasm.a_load_const_stack

git-svn-id: branches/wasm@48049 -
nickysn 4 years ago
parent
commit
0e395a0d06
1 changed files with 2 additions and 7 deletions
  1. 2 7
      compiler/wasm32/hlcgcpu.pas

+ 2 - 7
compiler/wasm32/hlcgcpu.pas

@@ -389,7 +389,8 @@ implementation
   procedure thlcgwasm.a_load_const_stack(list : TAsmList;size : tdef;a : tcgint; typ: TRegisterType);
     begin
       case typ of
-        R_INTREGISTER:
+        R_INTREGISTER,
+        R_ADDRESSREGISTER:
           begin
             case def_cgsize(size) of
               OS_8,OS_16,OS_32,
@@ -406,12 +407,6 @@ implementation
                 internalerror(2010110702);
             end;
           end;
-        R_ADDRESSREGISTER:
-          begin
-            if a<>0 then
-              internalerror(2010110701);
-            list.concat(taicpu.op_none(a_none));
-          end;
         else
           internalerror(2010110703);
       end;