浏览代码

+ also check register type (must be R_INTREGISTER) and subregister (must be
R_SUBW) in i8086's GetNextReg()

git-svn-id: trunk@37177 -

nickysn 8 年之前
父节点
当前提交
30c38a81a9
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      compiler/x86/cpubase.pas

+ 4 - 0
compiler/x86/cpubase.pas

@@ -647,6 +647,10 @@ implementation
       begin
         if getsupreg(r)<first_int_imreg then
           internalerror(2013051401);
+        if getregtype(r)<>R_INTREGISTER then
+          internalerror(2017091101);
+        if getsubreg(r)<>R_SUBW then
+          internalerror(2017091102);
         result:=TRegister(longint(r)+1);
       end;