[hatari-devel] Possible bug in 060 exception stack frames

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

 

while working on a standalone version of an installable FPSP, i did some tests with Hatari. Currently, the test program crashes with an illegal instruction. The reason seems to be that, when executing

 

mulu.l -(a7),d2:d3

 

https://github.com/torvalds/linux/blob/0da0a8a0a0e1845f495431c3d8d733d2bbf9e9e5/arch/m68k/ifpsp060/src/itest.S#L2993

 

the emulation package fetches an opcode of 0x0000 instead of the real 0x4c27

 

Could there be a problem with the opcode being placed at the wrong location when using predecrement mode of stackpointer?

 

Attached is the test program that i'm using. It was built using itest.sa and ftest.sa from the package, only thing that needed to be done was to implement the callouts to print a string/number (and the usual startup code of course). Results are both printed on screen, and written to fpsptst.txt

 

It is only intended to be run on 060, with the FPSP installed (could be the attached one, or one already built into ROM, like for Milan/Hades/CT60). The test program (fpsptst.tos) currently does not check that, but the emulation package (fpsp060.prg) checks for running on a 040 at least.

 

 

 

PK=U1R(���fpsptst.tosUT	f`f`ux�dԜLTW��#�8�GD@FD�0�0"�`@ۥ�����ylwb�1��>�t�1�1
��LK���i��g�kL�>呦�ΟofΙ{��ݼ��{��������������e�ȀKz��
-��2��L��"��Jß�m@�s��*I(Y�ڍ�}��������/���nk�����P^2|ҁ�߆?m�g��������}o����Ͽ��<�����On��ngG����e��L�)Y܁�kcm�߹��̵�|Cų�vwvu{��E��/x����|e0�wusʭ����|���,1(��k��J�0������G��	�^�IIDΝ;��M���%��r������)���t���G�+x���k��g����}��~Wge<����3ٺ;zz���#�~>������
�ۮ�{��v����A�}X�oǎ���P���O�Xy�����X3\s��f���!\n+��/`���䄏K�&'���I�����r�^���������������������^��
 ����?�\Fϴr�nMa��s�����𼭗��c���^@�[��$��b�2LI �
$��^�E��2\ ��k�Ę-�yf������(�¤l��y�_��R�3/
x���b:*j����1�|���1
j=ݑz*�`���
~�O�?���v�2����]}�)����>��X�*k%�e�C�R��4QK�����ٝ�=��F<cȤOo�Q�3>�~;`G�OemY���v�u�즻�la'����2���MP�:ϳ��ۆ�
k�?&�q������%��7	��Nj$����}����׍�����d���&]���^��Z�S�zwRY ��&�6���W|Dk΋����'yE����`�����i����/a�v<e���7@�͐M��f�yv�0B��}P`�9�X���һ��tmf��C$n~��DK�������L��n~���m>���e��<Ɵ9u��5)s�V��r��S���]O�k����Y+��)c���+Ls���+X 5���f���yK}H|C�8y5t=�Du��R�Md�Y�����==�]�&�I��]/����(�矷�����6�8��1é+������F�<7�+�y����!ve�кv��\X�}�;����h�/�j��'���ڏ����uA������׎j�������P�����Cȯ��N����f���Z�vw�k��9>Nb���O�2I�k�����5�LB��x���9��;O��V�ϵ�A�w�m����JZc�@ϷH�r4L����<��2��c�C����G�d�@.bd|��/!r_�<�Kt��9	�Ƙ�MWy�)%.#��ZG2PvE�D"]�p��HJ��[h-J.�#���r��&hS#����~J�g��x�S���T6<����}���$[�A�6�a��}���_
�Ϩ�wQ�N~>]6B����y]h��0ð}�9]*gA�A��������ץr8���V�.K��M��9]�������}�	>�ʱn�ɯ��������r������$X:����d兯?y岐�,�~�~?E�sr+ �����䦀�A�K����\������N3��x�&�}Sar�'7K��\\����o����j���{CQU���Ӭ��ڊ�v1w-��������3���Q�s��Yh:Ć��}p��[KO�=��˅�������wg�N����C'P��Q�����2��@*H�!nM�JHj�\������"k��5WH���N#�D'��P��6^'+����e�w%
�x^�		I�S�B�W����
��"�;�ֳo�D3#�d���_ ��Q�c�m1[�����<��VF\�T�*T�%��b�@��J׽ψ��׫��1M\]��������]=�τ:����N���5Gm�q^89}$�3p��$>K�)�<̙z��J��[�=4S�K�9�#�/��m�%���j}0�U"���8}�ES_�B�����JJ���|fsww��������k߾.U����p�s-?o;��=_J�w�z��!�;��e��2J��-ڿŗ�8�"�������FLR�2��V��d�o�,��}��E�����
"�4�i'�ހ�W�75h0��H��P�:YM��{����YF��(q�	���#����� �b!6Ɉy:�B,���	q���Z�x�!�
���[(�ea����I��V��*�r���R��������L��i�2頣�k!�]+������k�r�\���C���G���׶�h����<�`!D[���h0�S ��L��E�Z�@ۥo�f
����E;�k>�>շ�O��]3��O2�"���⬔8#'��/����v����G�a��2Z�
����eڴ՗m��ҡA����c�2�ZОh�P�U-�<U$e4�^�7��2
7�d�o��񠧨h��Z�����DEJ���)=�R�&	濭濭��M�����3T���$����{��������Pi�L���]�MoX��mӌ���d�F��}���5�#K�H3��@��I��fd���+�iz�"�lw�+�:^����
�32������
�32��/
�̋$m�������	�<�P�u��V~̳V~�G�F��
X���Â��2�y��U�������A?�Jӈ/9���9G�"ѮD�����I�����bV�]q�i[�+`�b�+�@�О��"�?+L!�:.�Gd��a�o�u���Z�@ۣo7�vD���Gd�?Kx�g]ѷ�V;"�	�����4�@siY�v֟9Ɉ�wyb����;S�<"n�s�m�KO���)�������G��<q#���a���]�"��0�iy��Y.o����x�ffܕ�q��-&�#a��^-f0�J}{6k0�}Ƙ��e_�E�9��{���an
�s�ޑ����~���q�
2��q:�����ÉK��#��ѽP��B�
�K�����=*a������0:�L��̴�:�z��bB��Y�	���Y�o�
f*�TI���0�+u�|=�O��Mu[ �����֎�ZY
\�0�'�W]O�[�Dž�)G#���z\��W�+���0�p����oEc�=���w����������m���U��d
D�#�"���4���ᅮ.�h.�KR_���*ˎ��U��3@O�|�&%��|��"���v=�[\�3�m��?�◜���Q����T�!H���?%\e�zŒ�n�F>=:��?NH���KJW�
����[���Mzt�����ݗ@�-��}�������zt7�	���E-	�D���%�$�!���	�����o��KMK�z�~[d����L�_R��Y���e�ZF#���$^�T���9��c)CZy�$p�"���N���[��u��k���"���Q���̓��I�������.<���h���8���}[u���7[��#ߴ��X��B����o�0���,���_�p͑��E0����3���h�Z%�y]�$�Jfc�O�k�v�n���ݡIW4��`�F�m���5�虏������<R�:k 1T����g
$���K�0�%气.�|���c
��{�����a��Q��m���@O�۽U���7���)������5��l4��G��ӎ`�a�#:�28[�gk�ke��eX�A�N2��e�nZ���.+�J�ԡ`o;Afrd������[�y�ة(��� �ϏLt�{$�q��\�������c�o(l���PR�o�}�]�u�������i]����;v�^��@{��� ��~/d�"�]sG�.Zb%�e�4D��*�Szi��x0\����OҶZ?-�&ܥ���
��+�)��~��G��o'�o�R�Q�AgH--�it_��oI���=�?I7h)w�z}��C����|-�Z��Y/-�����������m�7�@F����o��<�h�6�"ﱱ�Ynj���h����v�8𧤛�*�x�o�gz�s#��Ɗ���<�RP0#�y����zC
d�)�l��im
j�ڭ�u�I�W+r��J�����&?��j���	-��vh��M��%�|�A�OB���6��N�uK�(�[ڬ{%a9����(EK�44D���
Y��g�u��:����6�(E�����g9�����^@k݂���PЪ����(�Ϭ�km�V�DjB�zXW�U�
�J����� UBUU�B�S�B����3�V���7�c�������?�oޛ�ى�*�T�{�j Ӈ���M��Ҿ�(��v&�2-<\���d:��hֲ������S�W��وk��/%;J���������A�ִ%E��b`��g�.Z����O,J���u�[���P��� �y��QN���(N�!9;�̖�A��9�J�Z;0����ݱܭ(KnO�d5˅�����#��Y��ùc�`�L+�S,���ׇ��0Xp�gPõs٭(K�=�ӃYni��)ʕ���`�2�b����ˣ��~e$����_q��$�n�]�n+������r%y3,�M&l���O�|�5��?_fr� �C�`�0�k�2~T]fJ������#�9��^
O��eK�b$��
��~�UzT���i�����Ӎ������{��̬,�Z}粘+k�WV��t��I?q����/�F�E{<���)L�������*�K�������
�K�I�8�kǒ?���>oަ�*&����k1���(�a����뾋{Ǹ��H#�q���Jc�٣�m�v.�����-7P�����o����ɨ��I<
5|w&1ah{u��K����J[bצ������6:��v���-EJ��ļ�SYpC����g{���ſT�6m�m]�>��Hu5�.�o�6�������|�O�Ů+m�_��1�����Lve%���7W;�����h��^
�_]xjqe��gLqn+�Ξ�;jSj/��`�k�����e�h��jgg����D��I/������/�/�c��;A/fx�^��>3f�:�c$K�;5J����z����/6Z��x�q�F����,�:Dx�2����h�����^ꗯ��PK=U1R(����fpsptst.tosUTf`ux�dPKQZ


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/