RetroBSD

2.11BSD operating system for microcontrollers
It is currently Thu Oct 18, 2018 9:51 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: MIPS16e instruction set
PostPosted: Wed Nov 04, 2015 7:10 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1079
Location: Sunnyvale, CA
Starting from rev451, the format of the RetroBSD user binaries and libraries is switched to MIPS16e. It significantly reduces the code size and leaves more space for user application data. It's totally transparent for the operating system: no changes in kernel is required.

The simulator (tools/virtualmips) has been extended to support the MIPS16e instruction set extension.

Basically, MIPS16e is a mix of 16-bit and 32-bit opcodes. Most used instructions have 16-bit opcode size.

Image

--Serge


Top
 Profile  
 
PostPosted: Wed Nov 04, 2015 9:12 am 
Contributor

Joined: Mon Apr 29, 2013 1:56 am
Posts: 196
Cool! Thanks for helping out!

I guess, now everyone should play with the various tools and games to test the change?


Top
 Profile  
 
PostPosted: Wed Nov 04, 2015 2:39 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Rebuilt to v451, also the image.
My smallerc stuff size went down a little bit, ie. from 24k to 22k..

The smallerc examples under v451:
Code:
# ls -l
total 317
-rw-rw-r--  1 root          933 Oct  9 02:00 Makefile
-rwxr-x--x  1 root        18100 Nov  4 06:17 adc
-rw-rw-r--  1 root          572 Oct  9 02:00 adc.c
-rwxr-x--x  1 root        18180 Nov  4 06:16 gpio
-rw-rw-r--  1 root          527 Oct  9 02:00 gpio.c
-rwxr-x--x  1 root        16800 Nov  4 06:15 hello
-rw-rw-r--  1 root           83 Oct  9 02:00 hello.c
-rwxr-x--x  1 root         8132 Nov  4 06:17 lcd6
-rw-rw-r--  1 root         7271 Oct  9 02:00 lcd6.c
-rwxr-x--x  1 root        17172 Nov  4 06:16 primelist
-rw-rw-r--  1 root          440 Oct  9 02:00 primelist.c
-rwxr-x--x  1 root        17192 Nov  4 06:16 primesum
-rw-rw-r--  1 root          492 Oct  9 02:00 primesum.c
-rwxr-x--x  1 root        19380 Nov  4 06:17 q8
-rw-rw-r--  1 root         4479 Oct  9 02:00 q8.c
-rwxr-x--x  1 root        28912 Nov  4 06:17 rain
-rw-rw-r--  1 root         3127 Oct  9 02:00 rain.c
-rwxr-x--x  1 root        19804 Nov  4 06:15 skeleton
-rw-rw-r--  1 root         2847 Oct  9 02:00 skeleton.c
-rwxr-x--x  1 root        17356 Nov  4 06:15 stdarg
-rw-rw-r--  1 root          704 Oct  9 02:00 stdarg.c
-rwxr-x--x  1 root        25352 Nov  4 06:16 test1
-rw-rw-r--  1 root         6233 Oct  9 02:00 test1.c
-rwxr-x--x  1 root        20976 Nov  4 06:16 test2
-rw-rw-r--  1 root         3934 Oct  9 02:00 test2.c
-rwxr-x--x  1 root        18068 Nov  4 06:16 test3
-rw-rw-r--  1 root          986 Oct  9 02:00 test3.c
-rwxr-x--x  1 root        18256 Nov  4 06:17 tetris
-rw-rw-r--  1 root        16351 Oct  9 02:00 tetris.c
#

The examples under v417:
Code:
# ls -l
total 343
-rw-rw-r--  1 root          933 Oct  9 02:00 Makefile
-rwxr-x--x  1 root        19928 Oct 27 10:19 adc
-rw-rw-r--  1 root          572 Oct  9 02:00 adc.c
-rwxr-x--x  1 root        20192 Oct 27 10:19 gpio
-rw-rw-r--  1 root          527 Oct  9 02:00 gpio.c
-rwxr-x--x  1 root        18628 Oct 27 10:18 hello
-rw-rw-r--  1 root           83 Oct  9 02:00 hello.c
-rwxr-x--x  1 root         8576 Oct 27 10:20 lcd6
-rw-rw-r--  1 root         7271 Oct  9 02:00 lcd6.c
-rwxr-x--x  1 root        19000 Oct 27 10:18 primelist
-rw-rw-r--  1 root          440 Oct  9 02:00 primelist.c
-rwxr-x--x  1 root        19016 Oct 27 10:19 primesum
-rw-rw-r--  1 root          492 Oct  9 02:00 primesum.c
-rwxr-x--x  1 root        21208 Oct 27 10:20 q8
-rw-rw-r--  1 root         4479 Oct  9 02:00 q8.c
-rwxr-x--x  1 root        30836 Oct 27 10:19 rain
-rw-rw-r--  1 root         3127 Oct  9 02:00 rain.c
-rwxr-x--x  1 root        21712 Oct 27 10:18 skeleton
-rw-rw-r--  1 root         2847 Oct  9 02:00 skeleton.c
-rwxr-x--x  1 root        19180 Oct 27 10:18 stdarg
-rw-rw-r--  1 root          704 Oct  9 02:00 stdarg.c
-rwxr-x--x  1 root        27176 Oct 27 10:19 test1
-rw-rw-r--  1 root         6233 Oct  9 02:00 test1.c
-rwxr-x--x  1 root        22804 Oct 27 10:19 test2
-rw-rw-r--  1 root         3934 Oct  9 02:00 test2.c
-rwxr-x--x  1 root        19892 Oct 27 10:19 test3
-rw-rw-r--  1 root          986 Oct  9 02:00 test3.c
-rwxr-x--x  1 root        18704 Oct 27 10:20 tetris
-rw-rw-r--  1 root        16351 Oct  9 02:00 tetris.c
#

So the size gain with smallerc is ~1.8kB typically under v451.

The /bin/* sizes went ~35% down as I can see.. A difference :)

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Wed Nov 04, 2015 7:49 pm 
Contributor

Joined: Mon Apr 29, 2013 1:56 am
Posts: 196
Pito wrote:
Rebuilt to v451, also the image.
My smallerc stuff size went down a little bit, ie. from 24k to 22k..

AFAIK, there was something in the library still compiled with -O and Serge changed it to -Os.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron




Powered by phpBB® Forum Software © phpBB Group

BSD Daemon used with permission