Statistics
| Branch: | Revision:

root / target-alpha / op.c @ 496cb5b9

History | View | Annotate | Download (14.1 kB)

1
/*
2
 *  Alpha emulation cpu micro-operations for qemu.
3
 *
4
 *  Copyright (c) 2007 Jocelyn Mayer
5
 *
6
 * This library is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU Lesser General Public
8
 * License as published by the Free Software Foundation; either
9
 * version 2 of the License, or (at your option) any later version.
10
 *
11
 * This library is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
 * Lesser General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU Lesser General Public
17
 * License along with this library; if not, write to the Free Software
18
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
 */
20

    
21
#define DEBUG_OP
22

    
23
#include "config.h"
24
#include "exec.h"
25
#include "host-utils.h"
26

    
27
#include "op_helper.h"
28

    
29
#define REG 0
30
#include "op_template.h"
31

    
32
#define REG 1
33
#include "op_template.h"
34

    
35
#define REG 2
36
#include "op_template.h"
37

    
38
#define REG 3
39
#include "op_template.h"
40

    
41
#define REG 4
42
#include "op_template.h"
43

    
44
#define REG 5
45
#include "op_template.h"
46

    
47
#define REG 6
48
#include "op_template.h"
49

    
50
#define REG 7
51
#include "op_template.h"
52

    
53
#define REG 8
54
#include "op_template.h"
55

    
56
#define REG 9
57
#include "op_template.h"
58

    
59
#define REG 10
60
#include "op_template.h"
61

    
62
#define REG 11
63
#include "op_template.h"
64

    
65
#define REG 12
66
#include "op_template.h"
67

    
68
#define REG 13
69
#include "op_template.h"
70

    
71
#define REG 14
72
#include "op_template.h"
73

    
74
#define REG 15
75
#include "op_template.h"
76

    
77
#define REG 16
78
#include "op_template.h"
79

    
80
#define REG 17
81
#include "op_template.h"
82

    
83
#define REG 18
84
#include "op_template.h"
85

    
86
#define REG 19
87
#include "op_template.h"
88

    
89
#define REG 20
90
#include "op_template.h"
91

    
92
#define REG 21
93
#include "op_template.h"
94

    
95
#define REG 22
96
#include "op_template.h"
97

    
98
#define REG 23
99
#include "op_template.h"
100

    
101
#define REG 24
102
#include "op_template.h"
103

    
104
#define REG 25
105
#include "op_template.h"
106

    
107
#define REG 26
108
#include "op_template.h"
109

    
110
#define REG 27
111
#include "op_template.h"
112

    
113
#define REG 28
114
#include "op_template.h"
115

    
116
#define REG 29
117
#include "op_template.h"
118

    
119
#define REG 30
120
#include "op_template.h"
121

    
122
#define REG 31
123
#include "op_template.h"
124

    
125
/* Debug stuff */
126
void OPPROTO op_no_op (void)
127
{
128
#if !defined (DEBUG_OP)
129
    __asm__ __volatile__("nop" : : : "memory");
130
#endif
131
    RETURN();
132
}
133

    
134
/* Load and stores */
135
#define MEMSUFFIX _raw
136
#include "op_mem.h"
137
#if !defined(CONFIG_USER_ONLY)
138
#define MEMSUFFIX _kernel
139
#include "op_mem.h"
140
#define MEMSUFFIX _executive
141
#include "op_mem.h"
142
#define MEMSUFFIX _supervisor
143
#include "op_mem.h"
144
#define MEMSUFFIX _user
145
#include "op_mem.h"
146
/* This is used for pal modes */
147
#define MEMSUFFIX _data
148
#include "op_mem.h"
149
#endif
150

    
151
/* Special operation for load and store */
152
void OPPROTO op_n7 (void)
153
{
154
    T0 &= ~(uint64_t)0x7;
155
    RETURN();
156
}
157

    
158
/* Misc */
159
void OPPROTO op_excp (void)
160
{
161
    helper_excp(PARAM(1), PARAM(2));
162
    RETURN();
163
}
164

    
165
void OPPROTO op_load_amask (void)
166
{
167
    helper_amask();
168
    RETURN();
169
}
170

    
171
void OPPROTO op_load_pcc (void)
172
{
173
    helper_load_pcc();
174
    RETURN();
175
}
176

    
177
void OPPROTO op_load_implver (void)
178
{
179
    helper_load_implver();
180
    RETURN();
181
}
182

    
183
void OPPROTO op_load_fpcr (void)
184
{
185
    helper_load_fpcr();
186
    RETURN();
187
}
188

    
189
void OPPROTO op_store_fpcr (void)
190
{
191
    helper_store_fpcr();
192
    RETURN();
193
}
194

    
195
void OPPROTO op_load_irf (void)
196
{
197
    helper_load_irf();
198
    RETURN();
199
}
200

    
201
void OPPROTO op_set_irf (void)
202
{
203
    helper_set_irf();
204
    RETURN();
205
}
206

    
207
void OPPROTO op_clear_irf (void)
208
{
209
    helper_clear_irf();
210
    RETURN();
211
}
212

    
213
/* Arithmetic */
214
void OPPROTO op_addq (void)
215
{
216
    T0 += T1;
217
    RETURN();
218
}
219

    
220
void OPPROTO op_addqv (void)
221
{
222
    helper_addqv();
223
    RETURN();
224
}
225

    
226
void OPPROTO op_addl (void)
227
{
228
    T0 = (int64_t)((int32_t)(T0 + T1));
229
    RETURN();
230
}
231

    
232
void OPPROTO op_addlv (void)
233
{
234
    helper_addlv();
235
    RETURN();
236
}
237

    
238
void OPPROTO op_subq (void)
239
{
240
    T0 -= T1;
241
    RETURN();
242
}
243

    
244
void OPPROTO op_subqv (void)
245
{
246
    helper_subqv();
247
    RETURN();
248
}
249

    
250
void OPPROTO op_subl (void)
251
{
252
    T0 = (int64_t)((int32_t)(T0 - T1));
253
    RETURN();
254
}
255

    
256
void OPPROTO op_sublv (void)
257
{
258
    helper_sublv();
259
    RETURN();
260
}
261

    
262
void OPPROTO op_s4 (void)
263
{
264
    T0 <<= 2;
265
    RETURN();
266
}
267

    
268
void OPPROTO op_s8 (void)
269
{
270
    T0 <<= 3;
271
    RETURN();
272
}
273

    
274
void OPPROTO op_mull (void)
275
{
276
    T0 = (int64_t)((int32_t)T0 * (int32_t)T1);
277
    RETURN();
278
}
279

    
280
void OPPROTO op_mullv (void)
281
{
282
    helper_mullv();
283
    RETURN();
284
}
285

    
286
void OPPROTO op_mulq (void)
287
{
288
    T0 = (int64_t)T0 * (int64_t)T1;
289
    RETURN();
290
}
291

    
292
void OPPROTO op_mulqv (void)
293
{
294
    helper_mulqv();
295
    RETURN();
296
}
297

    
298
void OPPROTO op_umulh (void)
299
{
300
    uint64_t tl, th;
301

    
302
    mulu64(&tl, &th, T0, T1);
303
    T0 = th;
304
    RETURN();
305
}
306

    
307
/* Logical */
308
void OPPROTO op_and (void)
309
{
310
    T0 &= T1;
311
    RETURN();
312
}
313

    
314
void OPPROTO op_bic (void)
315
{
316
    T0 &= ~T1;
317
    RETURN();
318
}
319

    
320
void OPPROTO op_bis (void)
321
{
322
    T0 |= T1;
323
    RETURN();
324
}
325

    
326
void OPPROTO op_eqv (void)
327
{
328
    T0 ^= ~T1;
329
    RETURN();
330
}
331

    
332
void OPPROTO op_ornot (void)
333
{
334
    T0 |= ~T1;
335
    RETURN();
336
}
337

    
338
void OPPROTO op_xor (void)
339
{
340
    T0 ^= T1;
341
    RETURN();
342
}
343

    
344
void OPPROTO op_sll (void)
345
{
346
    T0 <<= T1;
347
    RETURN();
348
}
349

    
350
void OPPROTO op_srl (void)
351
{
352
    T0 >>= T1;
353
    RETURN();
354
}
355

    
356
void OPPROTO op_sra (void)
357
{
358
    T0 = (int64_t)T0 >> T1;
359
    RETURN();
360
}
361

    
362
void OPPROTO op_sextb (void)
363
{
364
    T0 = (int64_t)((int8_t)T0);
365
    RETURN();
366
}
367

    
368
void OPPROTO op_sextw (void)
369
{
370
    T0 = (int64_t)((int16_t)T0);
371
    RETURN();
372

    
373
}
374

    
375
void OPPROTO op_ctpop (void)
376
{
377
    helper_ctpop();
378
    RETURN();
379
}
380

    
381
void OPPROTO op_ctlz (void)
382
{
383
    helper_ctlz();
384
    RETURN();
385
}
386

    
387
void OPPROTO op_cttz (void)
388
{
389
    helper_cttz();
390
    RETURN();
391
}
392

    
393
void OPPROTO op_mskbl (void)
394
{
395
    helper_mskbl();
396
    RETURN();
397
}
398

    
399
void OPPROTO op_extbl (void)
400
{
401
    helper_extbl();
402
    RETURN();
403
}
404

    
405
void OPPROTO op_insbl (void)
406
{
407
    helper_insbl();
408
    RETURN();
409
}
410

    
411
void OPPROTO op_mskwl (void)
412
{
413
    helper_mskwl();
414
    RETURN();
415
}
416

    
417
void OPPROTO op_extwl (void)
418
{
419
    helper_extwl();
420
    RETURN();
421
}
422

    
423
void OPPROTO op_inswl (void)
424
{
425
    helper_inswl();
426
    RETURN();
427
}
428

    
429
void OPPROTO op_mskll (void)
430
{
431
    helper_mskll();
432
    RETURN();
433
}
434

    
435
void OPPROTO op_extll (void)
436
{
437
    helper_extll();
438
    RETURN();
439
}
440

    
441
void OPPROTO op_insll (void)
442
{
443
    helper_insll();
444
    RETURN();
445
}
446

    
447
void OPPROTO op_zap (void)
448
{
449
    helper_zap();
450
    RETURN();
451
}
452

    
453
void OPPROTO op_zapnot (void)
454
{
455
    helper_zapnot();
456
    RETURN();
457
}
458

    
459
void OPPROTO op_mskql (void)
460
{
461
    helper_mskql();
462
    RETURN();
463
}
464

    
465
void OPPROTO op_extql (void)
466
{
467
    helper_extql();
468
    RETURN();
469
}
470

    
471
void OPPROTO op_insql (void)
472
{
473
    helper_insql();
474
    RETURN();
475
}
476

    
477
void OPPROTO op_mskwh (void)
478
{
479
    helper_mskwh();
480
    RETURN();
481
}
482

    
483
void OPPROTO op_inswh (void)
484
{
485
    helper_inswh();
486
    RETURN();
487
}
488

    
489
void OPPROTO op_extwh (void)
490
{
491
    helper_extwh();
492
    RETURN();
493
}
494

    
495
void OPPROTO op_msklh (void)
496
{
497
    helper_msklh();
498
    RETURN();
499
}
500

    
501
void OPPROTO op_inslh (void)
502
{
503
    helper_inslh();
504
    RETURN();
505
}
506

    
507
void OPPROTO op_extlh (void)
508
{
509
    helper_extlh();
510
    RETURN();
511
}
512

    
513
void OPPROTO op_mskqh (void)
514
{
515
    helper_mskqh();
516
    RETURN();
517
}
518

    
519
void OPPROTO op_insqh (void)
520
{
521
    helper_insqh();
522
    RETURN();
523
}
524

    
525
void OPPROTO op_extqh (void)
526
{
527
    helper_extqh();
528
    RETURN();
529
}
530

    
531
/* Tests */
532
void OPPROTO op_cmpult (void)
533
{
534
    if (T0 < T1)
535
        T0 = 1;
536
    else
537
        T0 = 0;
538
    RETURN();
539
}
540

    
541
void OPPROTO op_cmpule (void)
542
{
543
    if (T0 <= T1)
544
        T0 = 1;
545
    else
546
        T0 = 0;
547
    RETURN();
548
}
549

    
550
void OPPROTO op_cmpeq (void)
551
{
552
    if (T0 == T1)
553
        T0 = 1;
554
    else
555
        T0 = 0;
556
    RETURN();
557
}
558

    
559
void OPPROTO op_cmplt (void)
560
{
561
    if ((int64_t)T0 < (int64_t)T1)
562
        T0 = 1;
563
    else
564
        T0 = 0;
565
    RETURN();
566
}
567

    
568
void OPPROTO op_cmple (void)
569
{
570
    if ((int64_t)T0 <= (int64_t)T1)
571
        T0 = 1;
572
    else
573
        T0 = 0;
574
    RETURN();
575
}
576

    
577
void OPPROTO op_cmpbge (void)
578
{
579
    helper_cmpbge();
580
    RETURN();
581
}
582

    
583
void OPPROTO op_cmpeqz (void)
584
{
585
    if (T0 == 0)
586
        T0 = 1;
587
    else
588
        T0 = 0;
589
    RETURN();
590
}
591

    
592
void OPPROTO op_cmpnez (void)
593
{
594
    if (T0 != 0)
595
        T0 = 1;
596
    else
597
        T0 = 0;
598
    RETURN();
599
}
600

    
601
void OPPROTO op_cmpltz (void)
602
{
603
    if ((int64_t)T0 < 0)
604
        T0 = 1;
605
    else
606
        T0 = 0;
607
    RETURN();
608
}
609

    
610
void OPPROTO op_cmplez (void)
611
{
612
    if ((int64_t)T0 <= 0)
613
        T0 = 1;
614
    else
615
        T0 = 0;
616
    RETURN();
617
}
618

    
619
void OPPROTO op_cmpgtz (void)
620
{
621
    if ((int64_t)T0 > 0)
622
        T0 = 1;
623
    else
624
        T0 = 0;
625
    RETURN();
626
}
627

    
628
void OPPROTO op_cmpgez (void)
629
{
630
    if ((int64_t)T0 >= 0)
631
        T0 = 1;
632
    else
633
        T0 = 0;
634
    RETURN();
635
}
636

    
637
void OPPROTO op_cmplbs (void)
638
{
639
    T0 &= 1;
640
    RETURN();
641
}
642

    
643
void OPPROTO op_cmplbc (void)
644
{
645
    T0 = (~T0) & 1;
646
    RETURN();
647
}
648

    
649
/* Branches */
650
void OPPROTO op_branch (void)
651
{
652
    env->pc = T0 & ~3;
653
    RETURN();
654
}
655

    
656
void OPPROTO op_addq1 (void)
657
{
658
    T1 += T0;
659
    RETURN();
660
}
661

    
662
#if 0 // Qemu does not know how to do this...
663
void OPPROTO op_bcond (void)
664
{
665
    if (T0)
666
        env->pc = T1 & ~3;
667
    else
668
        env->pc = PARAM(1);
669
    RETURN();
670
}
671
#else
672
void OPPROTO op_bcond (void)
673
{
674
    if (T0)
675
        env->pc = T1 & ~3;
676
    else
677
        env->pc = ((uint64_t)PARAM(1) << 32) | (uint64_t)PARAM(2);
678
    RETURN();
679
}
680
#endif
681

    
682
/* IEEE floating point arithmetic */
683
/* S floating (single) */
684
void OPPROTO op_adds (void)
685
{
686
    FT0 = float32_add(FT0, FT1, &FP_STATUS);
687
    RETURN();
688
}
689

    
690
void OPPROTO op_subs (void)
691
{
692
    FT0 = float32_sub(FT0, FT1, &FP_STATUS);
693
    RETURN();
694
}
695

    
696
void OPPROTO op_muls (void)
697
{
698
    FT0 = float32_mul(FT0, FT1, &FP_STATUS);
699
    RETURN();
700
}
701

    
702
void OPPROTO op_divs (void)
703
{
704
    FT0 = float32_div(FT0, FT1, &FP_STATUS);
705
    RETURN();
706
}
707

    
708
void OPPROTO op_sqrts (void)
709
{
710
    helper_sqrts();
711
    RETURN();
712
}
713

    
714
void OPPROTO op_cpys (void)
715
{
716
    helper_cpys();
717
    RETURN();
718
}
719

    
720
void OPPROTO op_cpysn (void)
721
{
722
    helper_cpysn();
723
    RETURN();
724
}
725

    
726
void OPPROTO op_cpyse (void)
727
{
728
    helper_cpyse();
729
    RETURN();
730
}
731

    
732
void OPPROTO op_itofs (void)
733
{
734
    helper_itofs();
735
    RETURN();
736
}
737

    
738
void OPPROTO op_ftois (void)
739
{
740
    helper_ftois();
741
    RETURN();
742
}
743

    
744
/* T floating (double) */
745
void OPPROTO op_addt (void)
746
{
747
    FT0 = float64_add(FT0, FT1, &FP_STATUS);
748
    RETURN();
749
}
750

    
751
void OPPROTO op_subt (void)
752
{
753
    FT0 = float64_sub(FT0, FT1, &FP_STATUS);
754
    RETURN();
755
}
756

    
757
void OPPROTO op_mult (void)
758
{
759
    FT0 = float64_mul(FT0, FT1, &FP_STATUS);
760
    RETURN();
761
}
762

    
763
void OPPROTO op_divt (void)
764
{
765
    FT0 = float64_div(FT0, FT1, &FP_STATUS);
766
    RETURN();
767
}
768

    
769
void OPPROTO op_sqrtt (void)
770
{
771
    helper_sqrtt();
772
    RETURN();
773
}
774

    
775
void OPPROTO op_cmptun (void)
776
{
777
    helper_cmptun();
778
    RETURN();
779
}
780

    
781
void OPPROTO op_cmpteq (void)
782
{
783
    helper_cmpteq();
784
    RETURN();
785
}
786

    
787
void OPPROTO op_cmptle (void)
788
{
789
    helper_cmptle();
790
    RETURN();
791
}
792

    
793
void OPPROTO op_cmptlt (void)
794
{
795
    helper_cmptlt();
796
    RETURN();
797
}
798

    
799
void OPPROTO op_itoft (void)
800
{
801
    helper_itoft();
802
    RETURN();
803
}
804

    
805
void OPPROTO op_ftoit (void)
806
{
807
    helper_ftoit();
808
    RETURN();
809
}
810

    
811
/* VAX floating point arithmetic */
812
/* F floating */
813
void OPPROTO op_addf (void)
814
{
815
    helper_addf();
816
    RETURN();
817
}
818

    
819
void OPPROTO op_subf (void)
820
{
821
    helper_subf();
822
    RETURN();
823
}
824

    
825
void OPPROTO op_mulf (void)
826
{
827
    helper_mulf();
828
    RETURN();
829
}
830

    
831
void OPPROTO op_divf (void)
832
{
833
    helper_divf();
834
    RETURN();
835
}
836

    
837
void OPPROTO op_sqrtf (void)
838
{
839
    helper_sqrtf();
840
    RETURN();
841
}
842

    
843
void OPPROTO op_cmpfeq (void)
844
{
845
    helper_cmpfeq();
846
    RETURN();
847
}
848

    
849
void OPPROTO op_cmpfne (void)
850
{
851
    helper_cmpfne();
852
    RETURN();
853
}
854

    
855
void OPPROTO op_cmpflt (void)
856
{
857
    helper_cmpflt();
858
    RETURN();
859
}
860

    
861
void OPPROTO op_cmpfle (void)
862
{
863
    helper_cmpfle();
864
    RETURN();
865
}
866

    
867
void OPPROTO op_cmpfgt (void)
868
{
869
    helper_cmpfgt();
870
    RETURN();
871
}
872

    
873
void OPPROTO op_cmpfge (void)
874
{
875
    helper_cmpfge();
876
    RETURN();
877
}
878

    
879
void OPPROTO op_itoff (void)
880
{
881
    helper_itoff();
882
    RETURN();
883
}
884

    
885
/* G floating */
886
void OPPROTO op_addg (void)
887
{
888
    helper_addg();
889
    RETURN();
890
}
891

    
892
void OPPROTO op_subg (void)
893
{
894
    helper_subg();
895
    RETURN();
896
}
897

    
898
void OPPROTO op_mulg (void)
899
{
900
    helper_mulg();
901
    RETURN();
902
}
903

    
904
void OPPROTO op_divg (void)
905
{
906
    helper_divg();
907
    RETURN();
908
}
909

    
910
void OPPROTO op_sqrtg (void)
911
{
912
    helper_sqrtg();
913
    RETURN();
914
}
915

    
916
void OPPROTO op_cmpgeq (void)
917
{
918
    helper_cmpgeq();
919
    RETURN();
920
}
921

    
922
void OPPROTO op_cmpglt (void)
923
{
924
    helper_cmpglt();
925
    RETURN();
926
}
927

    
928
void OPPROTO op_cmpgle (void)
929
{
930
    helper_cmpgle();
931
    RETURN();
932
}
933

    
934
/* Floating point format conversion */
935
void OPPROTO op_cvtst (void)
936
{
937
    FT0 = (float)FT0;
938
    RETURN();
939
}
940

    
941
void OPPROTO op_cvtqs (void)
942
{
943
    helper_cvtqs();
944
    RETURN();
945
}
946

    
947
void OPPROTO op_cvtts (void)
948
{
949
    FT0 = (float)FT0;
950
    RETURN();
951
}
952

    
953
void OPPROTO op_cvttq (void)
954
{
955
    helper_cvttq();
956
    RETURN();
957
}
958

    
959
void OPPROTO op_cvtqt (void)
960
{
961
    helper_cvtqt();
962
    RETURN();
963
}
964

    
965
void OPPROTO op_cvtqf (void)
966
{
967
    helper_cvtqf();
968
    RETURN();
969
}
970

    
971
void OPPROTO op_cvtgf (void)
972
{
973
    helper_cvtgf();
974
    RETURN();
975
}
976

    
977
void OPPROTO op_cvtgd (void)
978
{
979
    helper_cvtgd();
980
    RETURN();
981
}
982

    
983
void OPPROTO op_cvtgq (void)
984
{
985
    helper_cvtgq();
986
    RETURN();
987
}
988

    
989
void OPPROTO op_cvtqg (void)
990
{
991
    helper_cvtqg();
992
    RETURN();
993
}
994

    
995
void OPPROTO op_cvtdg (void)
996
{
997
    helper_cvtdg();
998
    RETURN();
999
}
1000

    
1001
void OPPROTO op_cvtlq (void)
1002
{
1003
    helper_cvtlq();
1004
    RETURN();
1005
}
1006

    
1007
void OPPROTO op_cvtql (void)
1008
{
1009
    helper_cvtql();
1010
    RETURN();
1011
}
1012

    
1013
void OPPROTO op_cvtqlv (void)
1014
{
1015
    helper_cvtqlv();
1016
    RETURN();
1017
}
1018

    
1019
void OPPROTO op_cvtqlsv (void)
1020
{
1021
    helper_cvtqlsv();
1022
    RETURN();
1023
}
1024

    
1025
/* PALcode support special instructions */
1026
#if !defined (CONFIG_USER_ONLY)
1027
void OPPROTO op_hw_rei (void)
1028
{
1029
    env->pc = env->ipr[IPR_EXC_ADDR] & ~3;
1030
    env->ipr[IPR_EXC_ADDR] = env->ipr[IPR_EXC_ADDR] & 1;
1031
    /* XXX: re-enable interrupts and memory mapping */
1032
    RETURN();
1033
}
1034

    
1035
void OPPROTO op_hw_ret (void)
1036
{
1037
    env->pc = T0 & ~3;
1038
    env->ipr[IPR_EXC_ADDR] = T0 & 1;
1039
    /* XXX: re-enable interrupts and memory mapping */
1040
    RETURN();
1041
}
1042

    
1043
void OPPROTO op_mfpr (void)
1044
{
1045
    helper_mfpr(PARAM(1));
1046
    RETURN();
1047
}
1048

    
1049
void OPPROTO op_mtpr (void)
1050
{
1051
    helper_mtpr(PARAM(1));
1052
    RETURN();
1053
}
1054

    
1055
void OPPROTO op_set_alt_mode (void)
1056
{
1057
    env->saved_mode = env->ps & 0xC;
1058
    env->ps = (env->ps & ~0xC) | (env->ipr[IPR_ALT_MODE] & 0xC);
1059
    RETURN();
1060
}
1061

    
1062
void OPPROTO op_restore_mode (void)
1063
{
1064
    env->ps = (env->ps & ~0xC) | env->saved_mode;
1065
    RETURN();
1066
}
1067

    
1068
void OPPROTO op_ld_phys_to_virt (void)
1069
{
1070
    helper_ld_phys_to_virt();
1071
    RETURN();
1072
}
1073

    
1074
void OPPROTO op_st_phys_to_virt (void)
1075
{
1076
    helper_st_phys_to_virt();
1077
    RETURN();
1078
}
1079
#endif /* !defined (CONFIG_USER_ONLY) */