[LoongArch64] Part-5:add loongarch support in some files for LoongArch64. (#21769)
[mono-project.git] / mono / benchmark / muldiv.cs
blob1b1353e0a8a58f3ac303cc97e4f556647b1a1943
1 using System;
3 public class MulDiv {
5 public static int muldiv (int n) {
6 int res = n;
8 for (int j = 0; j < 1048; j++) {
9 for (int i = 0; i < (n * 4); i++) {
10 n = (n / 256);
11 n++;
12 n = n * 128;
16 return res;
19 public static int Main (string[] args) {
20 int repeat = 1;
22 if (args.Length == 1)
23 repeat = Convert.ToInt32 (args [0]);
25 Console.WriteLine ("Repeat = " + repeat);
27 for (int i = 0; i < (repeat * 50); i++)
28 muldiv (1000);
30 return 0;