I don't think this inscription is written in either
old Spanish or
old Portuguese.
The use of the
i in these cases is a 'modernism'; only 'recently' it replaced the
y in Portuguese; in Spanish (Castillian) the
y prevails.
The word
por may be either Spanish and Portuguese. The word
mi will be only Spanish.
On the other hand it doesn't make sense the use of the
y in the middle of the phrase and the use of the
i in Le
i and Re
i; it is either one or the other.
It could be that the guy who wrote this inscription intended to write in Spanish; but he was familiar to 'modern' Portuguese.
... hope i made myself understood

.